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

Accessibility of geometrical attributes within the Pythonpart API and Visual Scripting [Gelöst]


Dear support and developing team,

I’m currently creating workflow automations and I’m having some difficulties accessing the geometrical attributes in the Pythonpart API or in the Visual Scripting system.

Within the Allplan attributes, there are several attributes that contain geometrical information.
This information is very handy for automating workflows such as enumerating elements or indicating the elevation of the elements.
Specifically, I’m looking at the following Allplan attributes:
• 97: bottom of element
• 98: Top of element
• 163: X coordinate
• 164: Y coordinate
• 165: Z coordinate

I have not found any way to access these attributes in Visual Scripting or in the Pythonpart API.
There is a method, GetAttributes() from NemAll_Python_BasisElements, but unfortunately, this method does not return the attributes referred above.
Therefore I’m having to resort to data processing outside of Allplan, while this workflow works it is a bit cumbersome and uninviting to users who are unfamiliar with python scripts.
Here you can see an example of this kind of workflow: https://youtu.be/e57zvD7YF-c

Can you give me any advice on how to read out these attributes with the API?
If the API currently is not able to read these attributes, I would like to ask you to consider adding a method for this.

Thanks in advance.

Steven Maijinckx

Lösung anzeigen Lösung verbergen

Hello Steven,

thanks for the analysis. We will implement the access to the "hidden" attributes in one of the next versions.

As a work around you can use the CallMass on the geometry part.

Best regards
Horst

spam/pishing entry deleted ..

Allplan Webentwicklung

Private messages must be private. No support request via Private message.

Hi Steven,

please have a look at the PythonPart example "GetObjectAttributesInteractor". Here you can see how to get the attributes from Allplan elements.

There is also a VisualScripting example "ExportAttributesToCSV", which shows how to get access to the attributes.

Best regards
Horst

Hello Horst,

Thank you for your time.

I have tested some things with the interactor example.
So far it seems to me that the interactor prints only the attributes which are visible in Allplan.
If the object is a 'Macro' element it has the X & Y coordinate visible in the attributes, and GetAttributes() also prints these values.
But if the object is a Wall or any other architectural object the coordinates are not visible and GetAttributes() also doesn't print it.
But the customized *.rdlc report is capable of getting this data for both the 'Macro' object and the architectural objects.
(you can test it with the rdlc-file attached to this message)

Can I then conclude that the reporting module does not read this data out of a database, but instead triggers a function that calculates these values?
So to read this data I will need to use CalcMass()[3] on the geometry part of the architectural object?

Many thanks for the feedback.

Kind regards,
Steven Maijinkcx

Anhänge (1)

Typ: text/xml
940-mal heruntergeladen
Größe: 27,76 KiB

Hello Steven,

thanks for the analysis. We will implement the access to the "hidden" attributes in one of the next versions.

As a work around you can use the CallMass on the geometry part.

Best regards
Horst