Mick from CNC Software Inc.

NET-Hooks: C# and VB.NET project examples

Recommended Posts

Do you have any C# .net examples showing how to use Tool [] class? or .GetTools()? I think these are needed, maybe?

I am looking to build a module to give me a csv of the tools in the selected operations. That i can then use to create a POST message for our Database API.

Any related info would be super helpful.

Thanks!

JonRob

Share this post


Link to post
Share on other sites

The nethook nesting example is great gentleman, got me started in no time!! I hope we will be seeing more projects to come!!

Share this post


Link to post
Share on other sites
15 minutes ago, Roger Martin from CNC Software said:

Peter,

If you have project suggestions, send them to us. - SDK[at]mastercam[dot]com

Thanks Roger! I will send my Ideas! (Hopefully they are not too outlandish. Sometimes it can be hard for me to predict what is realistic, or even possible!)

Share this post


Link to post
Share on other sites

Are there example solutions available? I remember running a few  a couple years ago but can't locate where to download them now.

 

Share this post


Link to post
Share on other sites
17 hours ago, peter~ said:

I believe the base project is available on the visual studio marketplace.

The API Team here at CNC is in the process of updating all our Visual Studio Project Templates and these will be official CNC products.

We have updated these templates to offer a better developer experience. The new project templates will allow you to select a version of Mastercam to target based on the installed version(s) of Mastercam on your PC. You will be able to add additional APIs based upon the Mastercam version your are targeting, for example SimAccessManaged or ToolNetApi and so on. The FT file will no longer need to be hand edited and will automatically be updated when the project is created. 

You will still need to run Visual Studio as an Admin to use the post build step, this is a windows security feature.

I don't have a release date but we are currently in testing. Once they are ready to be published the existing project templates (by me) on the Visual Studio Market Place will be removed.

  • Like 1

Share this post


Link to post
Share on other sites
40 minutes ago, Mick George said:

The new project templates will allow you to select a version of Mastercam to target based on the installed version(s) of Mastercam on your PC.

Is this different from the .props file?

Share this post


Link to post
Share on other sites
Just now, peter~ said:

Is this different from the .props file?

I should have made that clearer. I'm referring to the .NET project templates not the C-Hook project templates.

  • Thanks 1

Share this post


Link to post
Share on other sites
35 minutes ago, Mick George said:

I should have made that clearer. I'm referring to the .NET project templates not the C-Hook project templates.

Cool, thanks for clearing that up, any news if the C++.Cli templates will be part of that update?

Share this post


Link to post
Share on other sites
12 minutes ago, peter~ said:

Cool, thanks for clearing that up, any news if the C++.Cli templates will be part of that update?

C++ update yes, investigating CLI

Share this post


Link to post
Share on other sites

Thanks for the link to the projects.

I'm glad to hear you are working on improvements to the nethook examples.  When I used the examples a couple years ago I hit a series of snags and by the time I had the examples working my excitement about the possibilities had faded. Maybe I will actually do something with them this time, its cleat that the potential is huge.

Share this post


Link to post
Share on other sites
1 minute ago, eortiz said:

Thanks for the link to the projects.

I'm glad to hear you are working on improvements to the nethook examples.  When I used the examples a couple years ago I hit a series of snags and by the time I had the examples working my excitement about the possibilities had faded. Maybe I will actually do something with them this time, its cleat that the potential is huge.

What kind of issues?

Share this post


Link to post
Share on other sites
Just now, peter~ said:

What kind of issues?

I can let you know when I work through them this round.  I should take this opportunity to thank you for offering projects in both C# and Vb.net, I prefer VB.Net despite it being unfashionable (Basic was the first language I learned and I have used VBA all over the place).  I hope you plan on continuing to offer both flavors, sure they can be converted but that can introduce problems .

Share this post


Link to post
Share on other sites
1 hour ago, peter~ said:

The first time you build the project is the hardest, after that it gets easier.

The new .NET templates should just build without errors as long as you are running as Admin, otherwise remove the post build step and it'll build with no additional changes.

Share this post


Link to post
Share on other sites
1 hour ago, eortiz said:

Thanks for the link to the projects.

I'm glad to hear you are working on improvements to the nethook examples.  When I used the examples a couple years ago I hit a series of snags and by the time I had the examples working my excitement about the possibilities had faded. Maybe I will actually do something with them this time, its cleat that the potential is huge.

Please submit requests or enhancements to our existing examples to our [email protected] mailbox. We are always looking to add new examples.

Share this post


Link to post
Share on other sites
7 minutes ago, Mick George said:

The new .NET templates should just build without errors as long as you are running as Admin, otherwise remove the post build step and it'll build with no additional changes.

That's, really cool, unfortunately there is a lot of red tape for me to get templates installed, so I have to build from scratch every time. :(

Share this post


Link to post
Share on other sites
1 minute ago, peter~ said:

That's, really cool, unfortunately there is a lot of red tape for me to get templates installed, so I have to build from scratch every time. :(

Perhaps, now that these will be signed by CNC Software and are official, that might allow your company to install the templates.

Share this post


Link to post
Share on other sites
On 2/20/2020 at 2:07 PM, Mick George said:

Perhaps, now that these will be signed by CNC Software and are official, that might allow your company to install the templates.

Yes, I will ask for them, now that they are available & by Cnc Software..

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

  • 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