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:

C-Hooks and Development Software


Recommended Posts

Hi,

 

I have a problem that can't be solved with Visual Basic Scripts, and need to get started with Visual C/C++.

 

I am looking for some advise from experienced c-hook programmers who have successfully accomplished this task.

 

First, let me give you a bit of background so that you can best give me advise; I have 20 years of off and on programming skills, began with Assembly, then C, C++, visual basic, and currently my language of choice is pascal "Delphi".

 

Its been at least 10 years since I touched c++ and am rusty but should be able to pick up quickly.

 

Here is what I am interested in knowing: The Dev. Kit says to use Microsoft Version 6 Visual C++, but there are new versions out there 2003 and now 2005 .net etc. Do I need to buy v6 or can any of the higher versions work?. Also, has anyone used Delphi or know of port headers files for Delphi?

 

Any recomendations will be appreciated. I want to buy the Development software ASAP,so please give me as much info as you think i need I am really hot on this.

 

Thanks for all your help and advice in advanced.

 

Girus.

Link to comment
Share on other sites

quote:

currently my language of choice is pascal "Delphi".


Good choice cheers.gif But not for Mastercam frown.gif

 

quote:

Here is what I am interested in knowing: The Dev. Kit says to use Microsoft Version 6 Visual C++, but there are new versions out there 2003 and now 2005 .net etc. Do I need to buy v6 or can any of the higher versions work?.


C-Hooks for Mastercam V7 must use Visual C++ 5.0.

 

C-Hooks for Mastercam V8 and V9 must use Visual C++ 6.0.

 

For Mastercam X, .NET is required; be it VB .NET, C# .NET (I'm looking forward to C#) or C++ .NET. Maybe even other .NET-compatible tools like Delphi .NET and Python .NET confused.gif

 

quote:

Also, has anyone used Delphi or know of port headers files for Delphi?


For C-Hooks? I thought about it...for about a second. Messy.

Link to comment
Share on other sites

If you're comfortable with C/C++, that's a good start. If you'll be creating C-Hooks that require an interface beyond the Mastercam menus, you'll probably want to look at MFC (Microsoft Foundation Classes). The MFC is a (huge) group of classes to handle many common API and GDI tasks such as dialogs and their controls. However, there are also MFC classes for other non-window type things like strings (not as good as the STL but still pretty good), data structures (ready-made linked lists, queues, stacks, associate arrays, etc), network sockets and so on.

 

There are a few examples included in the Mastercam SDK to get you started. If you're looking for a particular Mastercam function or structure, don't bother looking in the accompanying documentation as it's quite out of date. You're better off searching the Mastercam header files themselves.

 

Also, this forum is a good place to visit if you get stuck smile.gif

 

Hope this is a start cheers.gif

Link to comment
Share on other sites

For Mastercam V8 and V9, only Visual C++ 6.0 will work, AFAIK. Maybe if you create unmanaged Visual C++ .NET projects, it'll work, but I doubt it if Mastercam can use C-Hooks built with the newer .NET libraries. Maybe someone from CNC Software can tell us for sure.

 

Now that 6.0 is two versions behind in the Visual Studio family, I know it can be hard to track down. I managed to find it though:

 

Visual C++ 6.0 Pro (Upgrade)

 

or

 

Visual C++ 6.0 Pro (Full)

 

HTH

Link to comment
Share on other sites

Its a long story but here it goes.

 

We make this standard part for Boeing. Its called a tapered shim. Basically this standard has an infinite conbinations in sizes. (for example the part can be .100 thick x 2.0 wide x 3.0 long x .010 thin.)

 

We currently make about 5,000 different conbinations.

 

The trick in making these parts is to have a vacuum chuck mounted in a rotary table. Then that is where the fun ends because every part depending on size will have a different angle the rotary table will need to rotate then you have the problem of how high do you raise your tool to accomidate the angle so you can position your tool to the zero part surface. Then you need ot make multiple cuts depending on the width of the part then you have to make multiple passes to remove the material depending on the thickness of the shim.

 

All of these variables are and the cut plan needs to be generated automatically so that we don't spend 30 minutes per part generating NC programs by hand or manually in cad then used in MC.

 

Currently I am using Visual Basic Scripts, which get most of the job done but there are many limitation due to the limited library that VB has at this time, but I was told that in c-hooks you have access to the entire MC library and more. So at this time it looks like that is my only choice.

 

What I am wanting to get to is a c-hook that displays a input dialog to enter 5 variables and once I do that it will generate the cut plan calculate the angle and perform all of the path routines and post a NC file ready to go with just 5 variables!!!!

 

If VB was not so limited I would have been able to do it, I think, but I wont know untill I get working with c-hooks.

 

That all in a nut shell! We maybe a big! nut but let me know what you think.

 

Girus.

Link to comment
Share on other sites

Sounds like it will be a cool program. smile.gif And save tons of time.

 

Feel free to post questions to forum. There's are several patient (and I might add saintly) people who helped me get started with chooks.

 

quote:

but I was told that in c-hooks you have access to the entire MC library and more.

Ha. Thats funny. biggrin.gif Not true, but funny. You have access to a lot of the variables and functions. Many of them quite powerful. That tied in with 30ish years of c/c++ and other programming libraries out there you can do miraculous things.

 

But (there's always a but) the Mastercam SDK does not not give access to everything. The sdk is crippled in some very odd ways. The why's and wherefore's of which I won't even try to speculate on.

 

Again, good luck.

 

Bryan smile.gif

Link to comment
Share on other sites

Good luck with your C-hook development.

 

Like Bryan said,

quote:

Mastercam SDK does not not give access to everything. The sdk is crippled in some very odd ways.

I find that sometime it's better to goto the header file and search for the function call yourself. SDK has limited explanation on what does the function do and how to properly call it.

 

also, since version X is almost here rolleyes.gif , might want to consider putting this project on hold. Version X might not work with the Chook you develop now since it's .Net based. JM2C...

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