Launch Python Script from HM or check value for Theta/MCSID in CQUAD4/CTRIA3 card
Hi,
I was wondering if it was possible to launch python script file from HyperMesh.
I mean that I have a .py in /MyDocuments for example.
I would like to launch my macro HM. And then, in this macro, a command that launch my .py in /MyDocuments and continue normally.
Or, I would like to check if a value exists for theta/mcsid in CQUAD4/CTRIA3 card. Using 'hm_attributeindexvalue element $element_ID 3 -byid', how to check if a value exists or not ? Because trying this on an element which have no value returns '0'. But '0' could also be a value for theta so...
Thanks !
Answers
-
Why need Python ? Or TCL can't do what you want ?
0 -
Hi Cya,
I don't think it is possible to call a python script in HyperMesh. This is should be possible in near future.
Regarding the value, I think the hm_attributeindexvalue element $element_ID 3 -byid will return the index value (say if you referred a local system in MCID it should show the system ID).
I will check and let you know if there a way to return the THETA through command.
0 -
If you have pyhton installed, in your tcl script you could:
exec /path/to/python python.script.pyand you will execute the python script. But as far as I know, there is no python API in Hyperworks.
0