Support Forum

How can i read all element's attributes?


Hello

I am trying to read atributes of some elements in drawing file.
I am using AllplanBaseElements.ElementsAttributeService.GetAttributes(element) method

It gives me list of standard attributes. For example for Symbol fixture it gives me this: [pic1.jpg]

How can i read other particular attributes for this fixture?
For example i need to read @1053@ (Offset to TL) or @409@ (Fileset name) how can i do it?

I tried to Assign needed atribut to fixture beforehead. [pic2.jpg]
But it doesn't work properly. Python script reads this atribute. But when atribute changes (i move fixture to other Fileset or change Offset to TL) Python script shows me unchanged attribute.
Label or Legend shows me changed attribute. Python script does not.

Thanks

Anhänge (2)

Typ: image/jpeg
17-mal heruntergeladen
Größe: 69,25 KiB
Typ: image/jpeg
26-mal heruntergeladen
Größe: 108,39 KiB

Hi Suren,

the information you are trying to request are not saved in the element. Instead, they are computed on the spot when the attribute is requested. If you are an ALLPLAN geek and have the quality manager enabled, you can start the Allplan Quality Manager tool and to the database dump "Badruc 5". Make sure, there is only one element in the drawing file, e.g. a cube with attributes, otherwise there will be too much print in the trace. But you will see the attribute 409 there, just as an empty string.

ElementsAttributeService gives you only the "raw data", which will always be the empty string.

The way, you should determine the file set name is:

  • get the drawing file number of the element from the base element adapter (GetDrawingFileNumber)
  • get the file set structure - I don't know how to do it unfortunately. Python API does not offer this possibility. If it is saved in some file, like the building structure is saved in an xml, then you can look into this file and knowing the DF number, you can establish the file set.

For me it seems, that the file structure is saved in an encrypted file, but maybe there is another ALLPLAN expert here, who knows better than me.

Best,
Bart