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:

How to start with C# / .Net-Hook


Recommended Posts

Hello everyone,

I want to start developing Net-Hooks in C# to do daily stuff faster and make work more efficient. I'm a CNC Operator and Programmer since a few years now and want to use my hobby (C# and WPF programming) to simplify the daily work and repeating tasks. For my first little project I only want to understand how to get started and do very basic and simple stuff to evolve and get into more complex things like semi automatic programming, fancy dialogs and do this also as a part as my job . But I struggle to setup the main structur of this Kind of Code and need some help and maybe this will also help someone else.

 

What I want to do:

- Get an Icon in the ribbon bar and this only should do -> select all visible Elements-> Transform X by 10 -> deselect all (just to learn the main structure of Code and other requirements)

 

What I have:

- Basic Skills in C# and WPF 

- Visual Studio Community (2017/2019)

- A linked Mastercam Account, with access to the SDK section

- Mastercam SDK

- Mastercam HLE (2019/2020/2021)

 

The struggle:

- Only the HLE Version of Mastercam at home, so I have to test it at work (maybe with first successes I get an full Version insatllation from my Boss for home too)

- The C Hook Wizard requires a "real" Mastercam Version, not supporting the HLE, so no C Hook Wizard for me?

- Get started form scratch with nothing just an empty VS Project 

 

Hope u guys can help me to create my really first Net-Hook and don't be amazed about my german-english skills :)

 

 

Link to comment
Share on other sites
19 hours ago, Destet said:

Hello everyone,

I want to start developing Net-Hooks in C# to do daily stuff faster and make work more efficient. I'm a CNC Operator and Programmer since a few years now and want to use my hobby (C# and WPF programming) to simplify the daily work and repeating tasks. For my first little project I only want to understand how to get started and do very basic and simple stuff to evolve and get into more complex things like semi automatic programming, fancy dialogs and do this also as a part as my job . But I struggle to setup the main structur of this Kind of Code and need some help and maybe this will also help someone else.

 

What I want to do:

- Get an Icon in the ribbon bar and this only should do -> select all visible Elements-> Transform X by 10 -> deselect all (just to learn the main structure of Code and other requirements)

 

What I have:

- Basic Skills in C# and WPF 

- Visual Studio Community (2017/2019)

- A linked Mastercam Account, with access to the SDK section

- Mastercam SDK

- Mastercam HLE (2019/2020/2021)

 

The struggle:

- Only the HLE Version of Mastercam at home, so I have to test it at work (maybe with first successes I get an full Version insatllation from my Boss for home too)

- The C Hook Wizard requires a "real" Mastercam Version, not supporting the HLE, so no C Hook Wizard for me?

- Get started form scratch with nothing just an empty VS Project 

 

Hope u guys can help me to create my really first Net-Hook and don't be amazed about my german-english skills :)

 

 

So, I have a bit more time to respond now,

a few years ago (2-3?), I was more or less where you are, I got the manager at my job at the time to approve the visual studio software, I presented them a demo written in the old vbscript where I created a bunch of edge curves on 2 sides of a flat nomex panel, then created a few hundred drilling and circle mill operation in the top and bottom plane in a few seconds. You could do something impressive with vbscript as well.

 

-> "- The C Hook Wizard requires a "real" Mastercam Version, not supporting the HLE, so no C Hook Wizard for me?"

The chook wizard is deprecated in a sense as it has been replaced by more modern vsix projects you can get from the Mastercam website.

If you have issues installing the sdk you should contact sdl<at>mastercam<dot>com

chooks are written in c++, they have nothing to do with c#,

nethooks are written in c#, however they have a lot less capabilities than chooks.

 

As for specific details about building a chook or nethook from scratch if you re-post this on the main mastercam page, I can share details on how to automate toolpatrhs and such.

 

If you need a very complex example of creating toolpaths automatically in a rush, feel free to contact : << sales<at>theebyte.com >> with your company info

We can get a solution built and the source code sent to you in a day or two, no problem.

 

 

 

Link to comment
Share on other sites
On 10/22/2021 at 8:05 PM, Mick George said:

Please post your request on mastercam developer forums so we can assist.

I have done that :)

 

On 10/22/2021 at 9:53 PM, [email protected] said:

HLE products will not run chooks for you, AFAIK

I know I just want to clearify that I only have HLE products at home and I have to test at work

 

On 10/23/2021 at 2:15 PM, [email protected] said:

-> "- The C Hook Wizard requires a "real" Mastercam Version, not supporting the HLE, so no C Hook Wizard for me?"

The chook wizard is deprecated in a sense as it has been replaced by more modern vsix projects you can get from the Mastercam website.

If you have issues installing the sdk you should contact sdl<at>mastercam<dot>com

chooks are written in c++, they have nothing to do with c#,

nethooks are written in c#, however they have a lot less capabilities than chooks.

 

As for specific details about building a chook or nethook from scratch if you re-post this on the main mastercam page, I can share details on how to automate toolpatrhs and such.

okay, I didn't know that these VS templates / projects are the "new" way, I know that C and C# are different worlds too

I think I will contact you for automatic toolpaths in an later state of learning, thanks :)

  • Like 1
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...