I just started using some UDOs in NXOpen Python. Initially I had a the problem, that callbacks executed only as long as the python script was running. As soon as the script finished, the UDO remained, but none of its callback functions executed.
I solved this by moving the .py files to a udo folder in my $custom_dir, as described here in the documentation.
However, the documentation does not mention that this is necessary - the folder is only mentioned for loading at startup.
Question 1: Is it possible to make UDOs work with code in arbitrary places?
My next step was symlinking my code into that directory (on a GNU/Linux system), which, surprisingly, did not have any effect.
Question 2: Is there a way to make NX work with the symlinks
Also, while I have the code in that place, I tried to get it to autoload at startup (see the link above). Unfortunately, the documentation does not mention Python. A funtion name Startup() did not work.
Question 3: Is autoloading code suported for python? If so, how?