camInstructor Video Blog

Do the Undoable in Mastercam

4/30/21 7:00 AM / by camInstructor Mike

Just because there isn't a button that performs what you need, this doesn't mean it cannot be done in Mastercam.

Like other machining nerds out there, I'm constantly perusing online forums and user groups about machining and Mastercam. This is where I found the idea for this video. I just may use forum ideas for future videos as I often struggle with content ideas for these videos. So, ya, feel free to leave your ideas for videos to help me out!

The topic starter was asking about how to offset/translate a hole 100x but have the distance between the holes get larger for each individual move. So a distance between holes 1 and 2 of 0.500, holes 2 and 3 of 0.5156, holes 3 and 4 of 0.5312 etc. This is not something you can do with a normal Translate inside of Mastercam. However, we can use some tools in Mastercam to perform this function.

First in this video, I look at importing a CSV file. CSV files can contain the XYZ coordinates of the points you wish to create. So, we can use a program like Excel to generate the values for the coordinates we need. Excel is a very powerful software and can be extremely useful for machinists in many different aspects of their jobs. I highly recommend exploring Excel for tasks beyond this example. Once we create the points in Excel, we can open this file with Mastercam and it will create the points for us.

Second, scripting. Now VBScripting is all but dead going forward. It does work in Mastercam now but this is being replaced with .net scripting so I would not suggest putting much into this at this point. I've used it here simply because I have not explored the net scripting yet. Alternatively, this could go directly into a chook as well but this will be a bunch more work than a simple script. Scripts allows us to use programming languages to loop and adjust point positions and have Mastercam create these points programmatically for us.

In closing, just remember, just because there isn't a button or function that doesn't do exactly what you want, this doesn't mean Mastercam isn't able to do it. Sometimes you have to get into these 'extra' tools and make your own functions. 

If you have another idea on how to accomplish the offsetting described, please share. I'm sure there's another option out there we did not look at here.



Want to learn more about Mastercam? Check out;

camInstructor for Teachers - Independent Learners - Students


Topics: Mastercam, Excel

camInstructor Mike

Written by camInstructor Mike

camInstructor Mike is Mike Wearne, an avid machinist, cnc programmer and overall connoisseur of all things machining. Mike is one of camInstructor's resident cad/cam/cnc experts and works part time at his local college teaching aspiring machinists how to program CNC Machines of all types.

Subscribe to Email Updates

New call-to-action

    Recent Posts