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:

run VBScript during post


Recommended Posts

runvbs()

 

File function

 

Description: Launches a Mastercam Visual Basic script.

 

Form: function argument

 

Argument: string variable containing the full PathName of the VBS script

 

Return Type: numeric variable, always returns 1

 

Code Example:

code:

# Define a numeric variable for the return value from the runvbs command

result : 0

# Define a string to hold the name of the VBS script to be run.

# NOTE that the FULL PathName is required !

strVBS "c:mcamXvbstrip_comments.VBS"

 

ppost # This posblock is called AFTER all files from the PST run are closed!

#Run the VBS script (FULL Path/Name is required !)

result = runvbs(strVBS)

Notes: VB scripts cannot take command line arguments.

To pass arguments to a script, write that data to an external file, and then read that file in the VB script for the program arguments.

Link to comment
Share on other sites
  • 1 month later...

Hi together,

 

I am searching for running a Mastercam-Visual Basic Script (for setup tplane) out of a VB.NET (NETHook2_0.dll).

 

Please can you give me a hint how to call the VBscript and how to prepare the function.

 

Can I use the scriptlinker for coding the VBscript?

 

Any help in this matter, I am grateful for!!

Link to comment
Share on other sites

Hello,

 

in detail I want to set the tplane only. In NEThook (nethook2_0.dll) it was not possible until now, in VBScript it is doing well.

 

So if you can support me in setting/modifying the tplane somehow, I am very grateful for a example piece of code.

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