I am trying to get Main Part In View ( View from drawing Tekla Structures) by script C#
Get MainPart In View.gh (4.1 KB)
. I got a list of Model Objects. But don’t know how to get MainPart from that list. Anyone have any ideas?
Assigned to Tekla category.
Are you sure there is only a single assembly in your drawing ?
The process could be :
- from any Part object in your drawing, use the GetAssembly method
Part.GetAssembly Method | Tekla Developer Center
- then use the MainPart property of the Assembly.
If you have several assemblies in the view, then you need to loop through all parts and store the main parts, removing duplicates.
Thank you, I’ll try to follow the instructions