[Вопрос] Local / Relative file path

Теги:

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".

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

Вложения (1)

Type: application/zip
Загружено 48 раз
Size: 1,32 KiB

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#


https://campus.allplan.com/ uses cookies  -  More information

Accept