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:

Visual Basic Scripts


divisionary1
 Share

Recommended Posts

Hello,

 

I have a Visual Basic question...

 

Is it possible to run a MasterCAM VB Script from an EXCEL VBA module?

(Assuming the SHELL Function was already executed in this VBA module to open MasterCAM)

 

My initial goal was to automate the "Create library from text" translation from an Excel generated comma delimited (.csv) file. I can now do this manually. I’ve learned that "Create library from text" is not possible via VB Script per Version 9.1. [searched Topic: VBScript and access to Tool library] Looking forward to Version 10!!

 

In the mean time, there are other VB Script functions that I would like to automate (i.e.. AutoDesk: Read File) from a VBA Module. Please Help.

 

Also, I am very interested in learning more about writing VB Scripts in MasterCAM. Are there any great websites, forums, books or other help on writing MC-VBS?? More Sample Code??

 

Thank You

Link to comment
Share on other sites

Divisionary

 

You can call a VBScript from a commandline for example;

 

code:

C:Mcam9ROUTER9.EXE ASKLEVEL.VBS

The above would automatically execute the script ASKLEVEL.VBS, therefore if you are shelling out from VBA you should be able to launch a script.

 

The Mastercam VBScript Editor help file has a lot of links to scripting resources online, also a search of these forums for the words vb script will return plenty of hits with lots of examples users here have submitted.

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