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:

VBScript quandary


Recommended Posts

I am writing a script to search for a re-occuring error in our .NC code posted from MasterCAM.

 

The basic functionality is this:

 

1. Post required ops to .NC files.

2. Check output .NC files for error.

3. If error is found, notify programmer.

 

I have the script broken into two files. One file currently posts ALL ops to .NC using our Mori and Okuma posts. The second file will currently and successfully check a (hard-coded) file for error and report back to the operator.

 

I have two hurdles to overcome before I can merge my scripts for completion.

 

1. I am unsure how to post a selected set of ops using MasterCAM's built-in functions (more than one, less than all).

 

2. I am also unsure how to retrieve the name of the .NC file that CIMCO brings up after a normal post.

 

If anyone could help steer me in the right direction, I would be most grateful.

 

Thanks in advance!

Link to comment
Share on other sites

You can use

 

code:

getOperationSelectedFromID

while cycling thru all operations to determine if the operation is "Selected". If it is, leave it alone. If it's not, use

 

code:

SetOperationPostingFromID 

To turn off posting for that operation.

 

You can also get the NCI destination for each operation using

 

code:

GetNciNameFromOperationID

HTH!

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