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

Greetings all, find myself here often when looking for answers, first time posting.

Questions follow my short rambling below.

 

After altering many posts and cobbling together a functional aggregate head post I started looking into writing vbscripts.  I accoplished what I set out to, digging through swaths of this site in particular to learn what was available to me.

 

During that time it became more and more clear that vbscripts were on their way out, while Net-Hooks using c# or vb.net seem to be the way of the future.

 

Throughout all these projects, documentation has been very sparse.  Usually requiring 3rd party documents or in the case of writing Net-Hooks with c#, digging through the dll files included with the project to decode functionallity.

 

I do not own my own mastercam license seat.  As far as I can tell, all the real documentation sits behind the mastercam.com paywall.  I have regiatered an accout, without linking a product, and still get re-routed when attempting to access any documentation.

 

Questions:

1) Is there any alternative method to accessing the Net-Hook documentation?

(Biggest sticking point is being unable to isolate drafting entities.  I was able to accomplish this using a vbscript after some fiddling.  Essentially ran the quickmaskall for drafting entities then searched for all selected entities)

 

2)Stumbled onto Mick's GitHub through my searching. Are the examples available there what falls under the open source license?

(Cant imagine it is the NetHook Api.)

 

3) The most current project file available to download for visual studio says it has beem updated for X8, am i to understand we have not yet reached compatability with mc2017?

 

Thank you all for your time.  Any example projects would be most helpful and I am happy to return the favor.

Link to comment
Share on other sites

oihannah,

You should be able to access the NET-Hook examples on our website so I am looking into that for you and hopefully have that resolved soon.

My GitHub is there for things I play around with and you can use whats there if it is at all helpful.

There is a project template for Visual Studio 2017 that you can install from Tools -> Extensions and Updates that helps get you started with a C# project if you were not aware of that.

Many projects that target older versions of Mastercam can usually be updated to run with a newer version of Mastercam and that is as simple as updating the projects NETHook3_0.dll reference to point to the newer version. Occasionally functionality is deprecated but it should be easy to see what needs to be updated.

 

Link to comment
Share on other sites

Thanks for the reply Mick.  I have found the more updated project file on the VS marketplace, I had already pointed to the new dll in mcam2017 so all is well there.

 

Still having trouble with isolating drafting entities via selection mask, but I could be missing something simple in that regard.

 

Is there a method for running function table commands like there was in vbscript?

 

I also appreciate your looking into access for the docs as well.   Until then, I will keep rooting through the dll from within visual studio to expose what I need.

Link to comment
Share on other sites

 

Quote

Is there a method for running function table commands like there was in vbscript?

Mastercam.Support.ExternalAppsManager.PostFTCommand (string)

This allows for "firing" many Mastercam commands via a Command (string) just as if the user had selected them via the UI.

 

email us -> SDK<at>mastercam<dot>com  and I can get you "docs".

Edited by Roger Martin from CNC Software
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...