opensim-org / opensim-gui

SimTK OpenSim graphical user interface and distribution.
Apache License 2.0
61 stars 32 forks source link

Document GUI scripts and their dependencies #1271

Open aymanhab opened 3 years ago

aymanhab commented 3 years ago

running GUI\createDoublePendulum.py in the GUI crashes with the following error: NameError: name 'addBodyToModel' is not defined. If you run the script ModelBuildingFunctions.py first then all works as expected

Steps to reproduce

Expected result

Actual result

(include screen grabs where appropriate)

Environment and GUI version

jenhicks commented 3 years ago

@aymanhab Is this still an issue?

aymanhab commented 3 years ago

Nothing changed in this regard in 4.2, if a user randomly runs a script out of order he/she gets an exception, we don't know how common is this use-case but I'd leave the issue open until we either retire the script or improve documentation. Totally not urgent.

tkuchida commented 3 years ago

Is it possible for the script to test whether the necessary pre-conditions have been met, and if not, report a useful message to the user? In this case, perhaps use a try/except at the top to catch nonexistence of the required method?