Python script/macro on Catia v5 toolbar -


i learning python language , learn writing script cad programs. not know 1 thing , didn`t finded information how put script/macro on catia toolbar. there no problem vba macros there other languages.

you can create catscript/catvbs/catvba call ever want (macro, application...) inside catia , assign icon on toolbar these "launchers".

code samples bellow in catscript.

for example, run hta file.

language="vbscript" sub catmain() set wshshell = createobject("wscript.shell") 'run hta. hta = "c:\temp\e3source\catvbs\your_file.hta"  wshshell.run hta , 1, true set wshshell = nothing end sub 

run exe file

sub catmain() set wshshell = createobject("wscript.shell") wshshell.run("c:\temp\your_file.exe") set wshshell = nothing end sub 

or

sub catmain() call catia.systemservice.executebackgroundprocessus ("c:\temp\your_file.exe") end sub 

run bat file

sub catmain() catia.systemservice.executeprocessus "c:\temp\your_file.bat" end sub 

run vbs file

language="vbscript" sub catmain() call catia.systemservice.executebackgroundprocessus("wscript.exe c:\cat\copy_folder.vbs") end sub  

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -