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:

Error message when I call the NETHook a second time


Recommended Posts

I am getting the attached error message when I call my NETHook a second time. If I close Mastercam and reopen it will work one time and report this error when called any subsequent time.

 

Below is the code I copy and pasted for my form. I am new to all of this so it appears that I am not closing my application properly. Any help is appreciated.

 

Thanks!

 

 

public override MCamReturn Run(int param)

{

 

MCamReturn result = MCamReturn.NoErrors;

 

//DialogManager.YesNoCancel("System function called", "Run()");

 

 

Application.EnableVisualStyles();

 

Application.SetCompatibleTextRenderingDefault(false);

 

Application.Run(new Form1());

 

return result;

}

post-4253-0-83611600-1367347403_thumb.jpg

Link to comment
Share on other sites

You're trying to spool up an Application within a running NETHook?

I'm surprised that anything (good) happens.

 

No that is not my intent. Being a total newbie to application programming, I was able to create my form and use a "test" project to debug in VS Express 2010 and everything worked so I copied what worked for the test to the Mastercam template and it works one time.... still very much in the dark as to how to interface with Mastercam. So not to exhaust anyone's patience here, where do I find the basics of how this all works?

 

I am slowly catching on to C# with online and professional help but have yet to uncover a step by step on simple NETHook creation.

 

Thanks!

Link to comment
Share on other sites

Thanks for the response. I didn't see it until after I posted mine.

 

Just getting familiar with the process right now. I have the "project info" that I referred to in another post as well as NC code revision level but that one is proving to be quite the rabbit hole at this point. It's a simple concept until you have to capture all the NC code filename outputs available. Meaning the user can enter a unique NC filename and that makes it tougher to track from a database. But I'm just getting started.

 

Thanks for the help!

Link to comment
Share on other sites

so.... did you find a way to get at the structured storage ?

 

No. Going with an Access Database per customer request which is a much better way to go in the end but I will revisit this in the future I think. I'll let you know if I do.

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