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

.vb file called trough a mapkey - fails

Pearl

.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

Tags (1)
5 REPLIES 5
Highlighted

Re: .vb file called trough a mapkey - fails


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


Martin Hanák
Highlighted

Re: .vb file called trough a mapkey - fails

... and tell us installed Creo version.


Martin Hanák
Highlighted

Re: .vb file called trough a mapkey - fails

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

 

 

 

Highlighted

Re: .vb file called trough a mapkey - fails


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


Martin Hanák
Highlighted

Re: .vb file called trough a mapkey - fails

Thanks for the info. I think I have read some of it (in the manual) (PRO_COM_MSG_EXE, etc) . Just haven't tested from xls as my attempt is to see if I can run a .vb file as-is. Having said that I will have ago at the test macro provided

Announcements