cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

"executing" a .vb file (as-is) how to?

SOLVED
Moonstone

"executing" a .vb file (as-is) how to?

to all

 

A silly question. I am reading the vbapi user's guide (still early days) and I cannot find  how to "execute" a .vb file as-is. By that I mean read a .vb file in CREO so that it is executed straight away. (no compilation, etc done). Is this possible? if 'yes' how ?

 

Thanks

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: "executing" a .vb file (as-is) how to?


@JXB wrote:

I am simply making my 1st step in the CREO automation capabilities.

Assume I have a .vb file, can I run the file 'as-is' so that the programme is "executed"? I do that a lot with another CAD package with which I can simply "play" the file. No need to create a .dll or .exe


Hi,

https://community.ptc.com/t5/Customization/How-startup-application-with-VBapi-in-Creo-Parametric-2-0... tells you that:

The way the VBAPI works is that an external program is started and either starts Creo or finds a link to a running copy of Creo. The external program adds the button to the menu and then waits using a Listener to report that the button was pushed. When the button is pushed the external program does whatever it's told to do when the button is pushed.

This means that you cannot put your VB-code directly into Creo and execute it.

You must create "external application". I think you can put your VB-code into MS Excel and execute it.

VBAPI User Guide contains Example section ... you can test set of examples which are available in Creo installation.


Martin Hanák

View solution in original post

6 REPLIES 6
Highlighted

Re: "executing" a .vb file (as-is) how to?

I am not a API expert so there is probably a better way to do this through one of the APIs but vb files can be called through mapkeys.

 

 

mapkey(continued) @SYSTEMDriveLetter:\\Folder\\SubFolder\\script.VBS;\

 

Highlighted

Re: "executing" a .vb file (as-is) how to?

Thanks

Surely there must be a File/Open kind of approach

Highlighted

Re: "executing" a .vb file (as-is) how to?

Hi,

please explain what action do you want to execute using .vb file.

Maybe https://community.ptc.com/t5/Customization/How-startup-application-with-VBapi-in-Creo-Parametric-2-0... provides some information concerning PTC Creo VBAPI...


Martin Hanák
Highlighted

Re: "executing" a .vb file (as-is) how to?

I am simply making my 1st step in the CREO automation capabilities.

Assume I have a .vb file, can I run the file 'as-is' so that the programme is "executed"? I do that a lot with another CAD package with which I can simply "play" the file. No need to create a .dll or .exe

Highlighted

Re: "executing" a .vb file (as-is) how to?


@JXB wrote:

I am simply making my 1st step in the CREO automation capabilities.

Assume I have a .vb file, can I run the file 'as-is' so that the programme is "executed"? I do that a lot with another CAD package with which I can simply "play" the file. No need to create a .dll or .exe


Hi,

https://community.ptc.com/t5/Customization/How-startup-application-with-VBapi-in-Creo-Parametric-2-0... tells you that:

The way the VBAPI works is that an external program is started and either starts Creo or finds a link to a running copy of Creo. The external program adds the button to the menu and then waits using a Listener to report that the button was pushed. When the button is pushed the external program does whatever it's told to do when the button is pushed.

This means that you cannot put your VB-code directly into Creo and execute it.

You must create "external application". I think you can put your VB-code into MS Excel and execute it.

VBAPI User Guide contains Example section ... you can test set of examples which are available in Creo installation.


Martin Hanák

View solution in original post

Highlighted

Re: "executing" a .vb file (as-is) how to?

Ok. Thanks. Will look at it again. Seems overcomplicated for such a simple thing

Announcements
Business Continuity with Creo: Learn more about it here.