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 for WCS icon and Viewport XYZ icon.


Recommended Posts

I would wirte to make a little script to turn these on and off when I am printing from Hardcopy. I was thinking of making a script to do Harcopy when you hit it turns them off then when done turns them back on any ideas..

 

Any help is appericated.

 

I lookedin the 9000 codes did not see anything there or in the help of VB for Mastercam.

Link to comment
Share on other sites

Not in the TXT file? That's not kewl. Well, if there are any shortuct keys to toggle WCS and viewport icons, then you could use the SendKeys() method in the WSH Shell class to try to automate that. I don't know of the shortcut keys, if they even exist, though.

 

If that isn't an option, you could always try the long 'n' nasty way by having your script exit out of Mastercam, parse the CFG file that you may be using (Ex: mill9.cfg) and replace Display viewport XYZ axes (y/n)? y and Display WCS XYZ axes (y/n)? y with Display viewport XYZ axes (y/n)? n and Display WCS XYZ axes (y/n)? n, close and save the CFG file, relaunch Mastercam, do a hardcopy, exit Mastercam, replace the modfied data in the CFG, save and relaunch Mastercam again. You could speed things up by having a "normal" CFG file and a "no XYZ and WCS" CFG file and do some copying/renaming instead of parsing. I think you'd need to use WMI to shut down Mastercam. And of course you'd need to read/write to/from an external file or Registry key that would store the filename of the MC9 you were working on and the CFG file to be used when launching. That would negate the need to pass arguments to the script (never tried passing arguments to a Mastercam VBScript before - regular VBS, yes...Mastercam VBS, headscratch.gif ).

 

HTH.

Link to comment
Share on other sites

Well about the same just opening it in Design without Viewports icons and printing from there or just keep going into screen/congif/uncheck/close then hardcopy then reopen screen/config and turn them back on.

 

Thanks out in and in and out seems like alot in my humble opinion to do something so simple. Might gt ghosting in winodws that way as well. soem fiels might be 20 to 100 mb so all that opening and closing would suck as well.

 

bonk.gifbonk.gifbonk.gif

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