Hi Everyone, is it possible to read the file path of the .pyp file working inside a VS? or to use a relative path?
I need it to work with the "Symbol Catalog service node".
- Forum
- CAD Parametric Modelling
- Visual Scripting
[Domanda] Local / Relative file path
Show most helpful answer Hide most helpful answer
Hi Daniele,
You would have to create your own node for that, as this resource is available in the scope of the python script of a node. You cannot access it from the scope of the function_to_execute inside the ExecPythonScript node. But I created the node (see attachment). Unzip it into one of these locations:
- std\VisualScripts
- usr\#USER_NAME#\VisualScripts
- prj\#PROJECT_NAME\VisualScripts
The node returns an absolute path to the PYP file of the VisualScript, as string. The directories are separated with a slash "/" (a Windows path will have backslash "\"). Hope that is OK. If not, feel free to modify the .py file in the attached zip to get the output you need.
Best,
Bart
Allegati (1)
Hi Daniele,
You would have to create your own node for that, as this resource is available in the scope of the python script of a node. You cannot access it from the scope of the function_to_execute inside the ExecPythonScript node. But I created the node (see attachment). Unzip it into one of these locations:
- std\VisualScripts
- usr\#USER_NAME#\VisualScripts
- prj\#PROJECT_NAME\VisualScripts
The node returns an absolute path to the PYP file of the VisualScript, as string. The directories are separated with a slash "/" (a Windows path will have backslash "\"). Hope that is OK. If not, feel free to modify the .py file in the attached zip to get the output you need.
Best,
Bart
Allegati (1)
usr\#USER_NAME#\VisualScripts
may not be correct in every case!
In a standalone installation of Allplan, the user data are stored in this folder:
C:\Users\#USER_NAME#\Documents\Nemetschek\Allplan\2024\Usr\Local
In a workgroup environment, the user data are stored in this folder:
\\#Datapath#\Net\Usr\#USER_NAME#