Skip to main content
16-Pearl
February 19, 2020
Question

.vb file called trough a mapkey - fails

  • February 19, 2020
  • 1 reply
  • 3043 views

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

1 reply

24-Ruby III
February 20, 2020

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

24-Ruby III
February 20, 2020

... and tell us installed Creo version.

16-Pearl
February 20, 2020

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