icon

Support Forum

[Question] [PythonParts] Script Object BaseElementAdapter and GetGeometry [Solved]

Tags:
  • 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

Attachments (1)

Type: image/png
Downloaded 36 times
Size: 143,14 KiB

Show solution Hide solution

Quote by cmaignan_milon
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

Quote by cmaignan_milon
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