Run a Catia macro with a python script -


i looking handling catia v5 python script windows powershell. need building script tells catia run macro recorded. i'm not-so-experienced python user , therefore have little idea of how this. welcome! thanks

edit:

also find command closes or doesn't let message boxes appear appreciated

(my apologies, i'm new site , don't know usual things are)

if understand correctly, you're trying run recorded catia macro (.catvba?) , call python called powershell. i'll assume powershell calling python working intended.

here's 1 way bridge gap between python , catia vba:

  1. bind catia macro custom toolbar icon, you'll notice when hover mouse on icon name of macro appear in bottom right corner of catia, e.g. "c:your_macro_name".

  2. once @ stage can call macro python with:

    import win32com.client catapp = win32com.client.dispatch('catia.application') satapp.startcommand('your_macro_name') 

(code credit automate catia v5 python)

this should call catia macro (under toolbar name).

also, suppress of messages come in catia, try starting vba code with:

catia.refreshdisplay = false catia.displayfilealerts = false 

hope helps!


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -