Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Recommended Posts

Is it possible to use Create-Letters function in a CHook or in VBS?

 

Recently I wrote my first CHook (that draws a point and displays its pointer). I used C# since I found it easier than C++. Then I wanted to use the Mastercam's function Create-Letters, but didn't succeed. Is it possible to use Create-Letters in C#, C++ or VBS?

 

And some additional questions:

 

After I test my CHook.dll in Mastercam I have to close Mastercam, otherwise I can't rebuild (don't have access to) the CHook.dll file. Then I restart Mastercam and run the CHook.dll again. In order to solve this issue, I put MC_UNLOADAPP in the return line, but it didn't help:

code:

public override MC_RETURN Run (int param)

{

...code...

return MC_RETURN.MC_UNLOADAPP;

}

How to change the code to provide for access to the CHook.dll file?

 

Is it possible to test the rebuilt CHook.dll file directly from Visual Studio? Why are there different Mastercam.exe for debug and release?

 

Thanks!

Link to comment
Share on other sites

Try changing your return to:

 

return MC_UNLOADAPP;

 

That should unload the dll. Having the MC_RETURN in your return is probably confusing MC.

 

Also MC won't unload a dll if you're using loading it via a function table. If you don't know what that means then you're probably not using one.

Link to comment
Share on other sites
  • 2 weeks later...

Thank you, but I am afraid

code:

 return MC_UNLOADAPP; 

doesn't work.

 

Please, I really need help on Create-Letters function. I still couldn't figure out if it is possible to use it with any of C-hook or NET-hook programming languages. The only thing I found is

quote:

#define TP_LETTERS 23 ///< letters

on line 452 of file AssocVar_CH.h. I need to know it to start programming in the appropriate language. But as far as I know by now, C++ is the best and the most powerful choice.

 

Bye!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...