Support Forum

[Frage] [PythonParts] Script Object BaseElementAdapter and GetGeometry [Gelöst]

Schlagworte:
  • PythonParts
  • ScriptObject
  • BaseElementAdapter
  • GetGeometry

Hi,

I'm working on a ScriptObject PythonPart.

In my case, I want to get the geometry of a wall so first I made :

self.script_object_interactor = SingleElementSelectInteractor(self.selection_result,
[ElementAdapter.Wall_TypeUUID],
"Sélectionner un mur"
)
but

geo = self.selection_result.sel_element.GetGeometry()

doesn't work

I can get UUID, attributes, etc of my sel_element (cf capture) so how can I get the GetPureArchitectureElementGeometry ?

Best
Christophe

Anhänge (1)

Typ: image/png
21-mal heruntergeladen
Größe: 143,14 KiB

Lösung anzeigen Lösung verbergen

Zitiert von: cmaignan35
I can get UUID, attributes, etc of my sel_element (cf capture) so how can I get the GetPureArchitectureElementGeometry?

Hi Christophe,

it may sound strange, but a wall does not have a geometry. Wall layer (aka tier) does. So select all the tiers using ChildsElementsService. Or Your selection interactor should select tiers (ElementAdapter.WallTier_TypeUUID) and your script gets the wall using parent elements service. I would tend to the second option, because AFAIK selecting the wall (as a whole) can only be done in ground view.

Best,
Bart

Zitiert von: cmaignan35
I can get UUID, attributes, etc of my sel_element (cf capture) so how can I get the GetPureArchitectureElementGeometry?

Hi Christophe,

it may sound strange, but a wall does not have a geometry. Wall layer (aka tier) does. So select all the tiers using ChildsElementsService. Or Your selection interactor should select tiers (ElementAdapter.WallTier_TypeUUID) and your script gets the wall using parent elements service. I would tend to the second option, because AFAIK selecting the wall (as a whole) can only be done in ground view.

Best,
Bart

Hi,

Thanks a lot

ElementAdapter.WallTier_TypeUUID works great

Best