Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] Local / Relative file path

Schlagworte:
  • Allplan 2024

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

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

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

Anhänge (1)

Typ: application/zip
318-mal heruntergeladen
Größe: 1,32 KiB

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

Anhänge (1)

Typ: application/zip
318-mal heruntergeladen
Größe: 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#