I would like to externalise my python scripts from my dynamo script, so I can work on the scripts seperately (via git).
Doing this is not a problem, what is a problem however is that I want to refer to the python scripts relatively to the dynamo script.
Is there a way to extract the path of the currently opened dynamo script?
I tried two options that kind of work (but really don’t):
- I use the dynamo log files to extract the path. However, this requires the dynamo file to be saved before it can be run.
- By using the “os.getcwd()” command. This only works if the open revit file is in the same directory as the dynamo file.
I would like to have a command that just returns the current working directory of the cynamo script.