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:

vb setupsheet


Bruce Caulley
 Share

Recommended Posts

I wrote that script.

 

The EMF file is the skeletonized graphic of the part that is on your screen when you run the setup sheet script. It was originally written to to write this file to a network drive, but I have since changed that to C:/temp, as people were getting other folks graphic! we have several mastercam seats here. smile.gif

 

This would be a good time to mention there is a major bug in that if your program has any Transform operations in it, running the script will crash your mastercam. There is supposed to be a patch avaible (Mick? you remember what it was?), but the alternative is to save your program, delete the transform operations, then run the script.

 

John

Link to comment
Share on other sites

Bruce,

 

Do this, open the script in the VBScript editor, scroll down to line 386 or so and change the following line of code:

 

from this:

code:

graphic="J:datatetest.emf"

to this:

code:

graphic= Replace(LCase(GetCurrentFileName), ".mc9", ".emf")

and that should fix the image issue. It will create an image of the part in the same location as the drawing.

 

NOTE: You will need to make sure the current drawing has been saved (has a file name).

Link to comment
Share on other sites

It runs well for me, but I have to change my backround color to white prior to running it or else all black graphics. I also seem to have an issue of it repeating tool numbers for some reason, I get 2 or 3 copies of certian tools, and then none of the others, right now I can only get 2 tools' info in the sheet. Anyone else having an issue like this? I am very vb ignorant, but very much appreaciate you guys creating tools like this for the rest of us.

 

 

Thanks again cheers.gif

Link to comment
Share on other sites

Hey this might be a bit off-topic in this post, but i'm having an issue with setup sheets.

 

Right now i'm using vbscript to make an excel setup sheet, and i'm trying to group up the differnet groups and all the operations inside of those groups.. I can get all the operations and all that, but how do you figure out what operation goes to what group?

 

All i've seen is people list out all the tools/operations, but they don't sort them out by group or anything of the sort.. frown.gif

 

I need a way to sort the operations in each group.

 

Group 1:

Operation 1 = Tool 1

Operation 2 = Tool 2

 

Group 2:

Operation 1 = Tool 2

Operation 2 = Tool 1

 

When you pull the data from mastercam, it would just be like

 

Operation 1 = Tool 1

Operation 2 = Tool 2

Operation 3 = Tool 2

Operation 4 = Tool 1

 

How can I make it sort that to tell me which group they belong to?

 

I just don't think it is possible, please someone proove me wrong!! frown.gif

Link to comment
Share on other sites

Could you explain that in a bit more detail for me? I'm not a Mastercam user really, just a programmer that got "hired" to write a script for my father. I have it all worked out except this last little problem... He says he understands that, but he hasn't helped me with it yet so... Could you explain in a bit more detail ?

Link to comment
Share on other sites

I suggested a array purely as a container to hold data for various operations. Individual variables for each group could've been used but that would've been messy. A dictionary object or a brand new class could've been used, which could've been slicker, but would've been more involved (drawing attantion away from the way to retreive operation data, which was the main topic of the thread). But all of that doesn't have anything to do with op group info, anyway.

 

Like I said in my post above, I can't see a way in the documentation to extract operation group(s) info.

Link to comment
Share on other sites

Well an array of operation ID's won't do the trick. There isn't (at least i'm not aware of) any way to check which group an operation belongs to.

 

My current script works perfect, but I just can't tell which group an operation belongs to. The method that Hardmill has posted well, I don't personally know enough about Mastercam to take any useful knowledge from. PLUS I don't have Mastercam on my home computer.. So making a script for for it is quite the task tongue.gif .

 

Ron, I am Marks son. I am making this script for you guys. smile.gif (Just in case you didn't know.)

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