Python scripting in Motionview
Hi!
Tl;dr - how do I call a python script from Motionsolve interface?
For a more thorough description - I read the documentation of Motionview 2022.3 regarding Python scripting and I would like to know, how can I write my custom scripts in python? At home I use VS code with python and I am used to some basic coding but I am confused by Motionsolve. I have a series of questions:
1) User Guide speaks of msolve library - this library comes installed with Altair? I have found few libraries with the same name online.
2) When I write the script, do I run it from e.g. VS code or from Motionsolve?
Thank you everyone for the help!
Answers
-
Hello Vojtech,
The msolve library does come installed with Motionsolve. There are some tutorials on how to create python scripts with the msolve library. Information can be found here: https://2023.help.altair.com/2023.1/hwsolvers/motionapi/getting_started/tutorials.html#tutorials
For information regarding the msolve package. Please refer to here: https://2023.help.altair.com/2023.1/hwsolvers/motionapi/msolve.html
The MotionSolve Juptyer notebook can be used to run the msolve scripts.
If you would like to use the mview library. Those commands can be found here: https://2022.help.altair.com/2022.3/hwdesktop/mv/topics/chapter_heads/mv_python_reference_r.htm
This can be run in MotionView. In 2022.3 you can right click the model browser to open a python window to script, you can also run a python script. In versions 2023 and above the python window can now be toggled on in the view menu.
Best,
Christopher Fadanelli
1