[Frage] [PythonParts] Objects and DrawingFile

Schlagworte:
  • Pythonpart
  • DrawingFile

Hi,

I see in the documentation that we can know the number of the drawing file from an element but can we move an element (wall for example) from an drawing file to another ?

Best
Christophe

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Hello Christophe,

I think the Allplan function you are talking about is the Copy, Move elements between documents. It is not exposed to Python yet. We are planning to expose a function for moving the entire content of a drawing file to another, but probably not for Allplan 2025 anymore. Maybe we will expose also the functionality of moving/copying certain objects to another DF, but I cannot guarantee you that now.

Have you tried to select the element, get the Python object from it (as described here), switch the DF and create it? Maybe it will work, I haven't tried it.
Best,
Bart

Hello Christophe,

I think the Allplan function you are talking about is the Copy, Move elements between documents. It is not exposed to Python yet. We are planning to expose a function for moving the entire content of a drawing file to another, but probably not for Allplan 2025 anymore. Maybe we will expose also the functionality of moving/copying certain objects to another DF, but I cannot guarantee you that now.

Have you tried to select the element, get the Python object from it (as described here), switch the DF and create it? Maybe it will work, I haven't tried it.
Best,
Bart

Hi,

Thanks for your answer.

However, the solution mentioned has 2 disadvantages:

  • CPU resource consumption / processing time
  • creating a new object means having a new ID (notably a new IFC GUID) which breaks the information chain...

Hope this option will be available

Best
Christophe

Hi,

be aware that themove/copy elements to another drawing file will always be resource consuming (actually disk drive consuming, not CPU) because of the necessity to open up another DF. It's Allplan limitation, as it is file based. Notice, that the native function also does that: the target DF is even visible for a short period of time.

Best,