Support Forum

[Frage] Is there any utility to modify drawing files in the building structure with python API ? [Gelöst]

Schlagworte:
  • PythonAPI
  • Scripting
  • Pythonpart

Hi,
I've found utility in the documentation (https://pythonparts.allplan.com/) to load and unload drawing files (DrawingFileService LoadFile/UnloadFile functions) ,
but not to remove, add, move, rename, reindex drawings in the building structure.

Is there any way to modify the building structure drawings via Python code?

or perhaps if I rename/move .ndw files in the project folder could I achieve these operations?

Thank you in advance

Lösung anzeigen Lösung verbergen

Hi,

firstly I make sure, we are talking about the same thing: drawing files or layouts. I suppose you are referring to the drawing files, but they cannot be reindexed. Layouts can.

At the moment there is no possibility to move, copy or rename a drawing file using the Python API. The same applies to the layouts. However renaming the drawing files is going to be implemented soon in the API. Other functionalities are going to be implemented step by step in a long term.

I would not recommend renaming the .ndw files directly in the project folder, as it may cause problems ex. with the associated elements like labels. I am afraid, a can't offer you any solution at the moment.

Hi,

firstly I make sure, we are talking about the same thing: drawing files or layouts. I suppose you are referring to the drawing files, but they cannot be reindexed. Layouts can.

At the moment there is no possibility to move, copy or rename a drawing file using the Python API. The same applies to the layouts. However renaming the drawing files is going to be implemented soon in the API. Other functionalities are going to be implemented step by step in a long term.

I would not recommend renaming the .ndw files directly in the project folder, as it may cause problems ex. with the associated elements like labels. I am afraid, a can't offer you any solution at the moment.