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:

Mastercam.NET support .dll not found.....


Recommended Posts

Im referencing the newer 2_0. dll

 

Currently Im reinstalling X2, then adding in the new service pack. Ive chopped so much out of the program

I dont know if I have everything there anymore. Works great for getting G-code, dont know about nethooks though.

 

I followed the examples but could not get the debugger section to work for me out of express. Had to manually start mcam and execute the hook. It would work through the first section of the examples where it displays the prompt boxes, but where it went to lay down toolpaths in the operations manager it would give an exception error.

 

Is VS C# express enough to get the job done? I understand that most users building hooks have the full version of VS.

 

Ill reply more after I install.

Link to comment
Share on other sites

Ok. I can get it to build and execute in mcam if i open a seat and manually launch the hook.

 

2 Problems I have:

 

1. I cannot get the debugger to work within VS 2005 C# Express. Yes, I started with the example text provided. Project/properties/debug:

 

Im given the following:

 

Start options

Command line arguments=mastercam.exe

Working Directory = C:McamX2

No matter what i do i cannot get this to fly.

 

 

2. I can build the example hook if i just open the project file, add the references(Mcamx2 Folder, NetHook2_0.dll) This will run through the dialogue manager example. How do I just build so that I may see the rest of the examples? When I try to exclude any of the previous from the project,when I execute the hookd in mcam, it shows the .net error and pukes.

 

Any help is appreciated as usuall. Thank you!

Link to comment
Share on other sites

Hi Kelly,

 

It sounds like you may have a couple of problems there. As for the first one, why you're having trouble debugging through Visual C# Express, I'm not entirely sure. I'm not aware of any specific reason why VC# Express wouldn't work - we did some limited in-house testing with it, and it seemed to work and debug in Mastercam fine. It might just be a bug in the API you've stumbled across, so if you haven't already you may want to try downloading and installing the Mastercam X2 SP1 off the main page's download site:

 

http://updates.mastercam.com/x2/sp1/master...vicepack001.exe

 

 

As for the second problem, being able to pick and choose between all the different examples, the 'switch' lies in the code and not in the DLLs you reference. You have to add a reference to the NETHook2_0.dll and you have to have your main Mastercam directory setup as your project's Working Directory.

 

In order to switch examples, the first thing you're going to need to do is decide which example you want to run. Open that example's file in Visual Studio (for example, section 2's "2.2 - The FileManager Class.cs"). Take note of the name of that example's class (in this case, it's "FileManagerExample"). Now, in the "1 - Basics" section of the solution manager, open up the only file in there - "1.1 - Intro and The App Classes.cs". This file is the driver for the application. It actually has all the hooks for a NetHook app, and it just calls any of the examples and runs them. So, in that same file, scroll down to the Run() method (should be line 77), and replace the line that runs the Dialog Manager example with whichever one you've chosen (for the purposes of our example, "FileManagerExample"). In other words, this little chunk of code...

 

code:

  public override MCamReturn Run(int param)

{

...

return DialogManagerExample.RunExample();

}


... should now look more like this chunk of code...

 

 

code:

  public override MCamReturn Run(int param)

{

...

return FileManagerExample.RunExample();

}


Hope that helps clear a few things up for you - let me know if that helps or not. Happy coding!! smile.gif

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...