Skip to main content
16-Pearl
Feb 19, 2020 12:17 PM UTC
Question

.vb file called trough a mapkey - fails

To all

 

I am trying to learn CREO customisation so I am "playing" around with mapkey + .vb file.

I set up a mapkey 'OS Script' option pointing to a .vb file containing a simple test program. If I press 'run' I can see the command DOS window being open but then I get a request to select the app (windows 10) to run the .vb file. So far I have not found anything in the vbapi doc on the matter. How does one run any of the vbapi examples provided?

 

Thanks

Regards

5 replies

24-Ruby III
Feb 20, 2020 11:04 AM UTC

@JBlackhole wrote:

To all

 

I am trying to learn CREO customisation so I am "playing" around with mapkey + .vb file.

I set up a mapkey 'OS Script' option pointing to a .vb file containing a simple test program. If I press 'run' I can see the command DOS window being open but then I get a request to select the app (windows 10) to run the .vb file. So far I have not found anything in the vbapi doc on the matter. How does one run any of the vbapi examples provided?

 

Thanks

Regards


Hi,

please upload your simple test .vb program and describe its functionality.

Translate
24-Ruby III
Feb 20, 2020 11:07 AM UTC

... and tell us installed Creo version.

Translate
24-Ruby III
Feb 21, 2020 7:45 AM UTC

@JBlackhole wrote:

Creo 5

Any program will do. Maybe the standard "Hello World" either displayed to a msgbox or in the status bar

something like that?

Public Class test1

 Public Sub mytest1

	Dim TheSession As pfcls.IpfcSession
	
	Dim message As Istringseq
	 message = New Cstringseq
	 message.Set(0, "Hello World")
	TheSession.UIDisplayMessage("Title", "a message", message)
	
	Msgbox("Hello World")

End Class

 


Hi,

in attached document you will find decription of procedure I just finished. It may help you understand how Creo VBAPI works.

Translate