Sign in to follow this  

Recommended Posts

Hello All, I have written half a dozen or so C-Hooks using Visual Studio 2017 and the work great on my computer. Problem arises when my co-workers try to run them. I have placed the .FT file and the .DLL in the correct local directory on each machine but when ran I get nothing. Ne errors just nothing. Anybody have any clues as to where I can start debugging this issue? 

 

TIA

Karl

Share this post


Link to post
Share on other sites

Are they C-hooks (written in C++) or NET-Hooks (written in C#/VB.net)?

If it's a C-hook are you building the release version?

 

No errors is suspicious; if you run an invalid .dll Mastercam should tell you.

  • Like 1

Share this post


Link to post
Share on other sites
24 minutes ago, [email protected] PISTONS said:

Hello All, I have written half a dozen or so C-Hooks using Visual Studio 2017 and the work great on my computer. Problem arises when my co-workers try to run them. I have placed the .FT file and the .DLL in the correct local directory on each machine but when ran I get nothing. Ne errors just nothing. Anybody have any clues as to where I can start debugging this issue? 

 

TIA

Karl

Hi Karl,

I would start by checking if the path on the end users computer is set to the "local" location on the users computer :

File -> Configuration -> Files -> Custom Add-In (dll)

Share this post


Link to post
Share on other sites

Zaffin, the programs are written in VB.net and yes it is a release version of the .DLL  

C++,  I am putting the custom .DLL and .FT files into the "standard" c-hook folder along with all the mastercam supplied programs. I didn't even know that they could be placed anywhere else. Can the .FT files also be located in this "custom" folder also?

 

But still no luck.

On my computer I set up a custom tab with the programs I have written. single click and program displays form with no issue. Other computers I never see the form or any errors just nothing. 

Any other sugestions?

Share this post


Link to post
Share on other sites

Copying files from one windows machine to another can cause the files to become blocked. Copy the files out of the Mastercam folder to a local temp folder away from Program files, right click and select properties of each file, make sure they are not blocked. Once all are ok then copy them back to the Mastercam folder.

  • Like 1

Share this post


Link to post
Share on other sites
49 minutes ago, [email protected] PISTONS said:

Can the .FT files also be located in this "custom" folder also?

I believe so yes, if that is the case then all your users could point to the same network location making it easy for you to update, although I do not recommend this since the network delay may cause you problems.

Share this post


Link to post
Share on other sites
Quote

Can the .FT files also be located in this "custom" folder also?

NO. 

The .FT (Function Table) files must be located in  Mastercam's \chooks folder.

Your add-in DLLs can be located wherever you wish, as the the data in the .FT file tells Mastercam where to find it.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I might try storing my add-ons in the network, I never thought about it before. It isn't really efficient to go around updating everyones computer everytime there is a change.

Share this post


Link to post
Share on other sites
On 1/21/2020 at 12:00 PM, [email protected] PISTONS said:

Hello All, I have written half a dozen or so C-Hooks using Visual Studio 2017 and the work great on my computer. Problem arises when my co-workers try to run them. I have placed the .FT file and the .DLL in the correct local directory on each machine but when ran I get nothing. Ne errors just nothing. Anybody have any clues as to where I can start debugging this issue? 

 

TIA

Karl

Karl,

were you able to resolve yout issue?

Share this post


Link to post
Share on other sites

No the  c-hooks still do nothing even though the FT and DLL files are in the c-hook folder. I have one of our IT guys looking at it but for them it is VERRRRRYYYY low priority.

Files are not blocked by windows. Next step for me is to install VS Studio on one of the offending machines and compile  the source code to see if it then works. 

Thanks for asking I'll keep this thread informed if I find any breakthroughs. I was off on Friday and Monday so I'm really backed up  so probably won't get to it until Thursday.

Share this post


Link to post
Share on other sites
1 hour ago, [email protected] PISTONS said:

No the  c-hooks still do nothing even though the FT and DLL files are in the c-hook folder. I have one of our IT guys looking at it but for them it is VERRRRRYYYY low priority.

Files are not blocked by windows. Next step for me is to install VS Studio on one of the offending machines and compile  the source code to see if it then works. 

Thanks for asking I'll keep this thread informed if I find any breakthroughs. I was off on Friday and Monday so I'm really backed up  so probably won't get to it until Thursday.

Does the mastercam event log show a resource error? Does it show the function being launched?

Share this post


Link to post
Share on other sites
Quote

Does the mastercam event log show a resource error?

Yes, if it cannot find the Resources specified in the FT file if will complain about that in the LOG.

Something like ->

ERROR (L49,C:\Program Files\Mastercam 2020\Mastercam\CHOOKS\MC_MultilingualAPP.ft): Unable to open resource module CHOOKS\PROJECT_NAME.dll.

Quote

Does it show the function being launched?

Yes, here I've launched a NET-Hook Add-In (RunUserDefined is the method that was called in the DLL) ->

NET-Hook function launched: C:\Program Files\Mastercam 2020\Mastercam\CHOOKS\NETHOOKSATELLITEASSEMBLYLANGUAGES.dll::RunUserDefined

You'll get something  very similar for a C-Hook Add-In.

Have you tried running your add-in in DEBUG?

If you set a breakpoint on in the entry point function of you add-in, it should get hit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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