Jump to content

Get 'Projection_type', 'Selection sequence' and other data from {<Trait: gom.%function%>}


---
 Share

Recommended Posts

Hello Support Team!

I have a question about several things.

 

Projection mode. <Trait: gom.Projection>
Is there a way to get '.projection_type' or '.intersection_mode' attributes from created elements
with this 'additional mode' (example: point_by_line_intersection, surface_point_by_intersection, intersection_point ets..)?

Maximum what i can get from <Trait: gom.Projection> (element.creation_sequence_args['intersect_element'].targets) is the name of the intersected element.
There is no any additional arguments describes intersection \ projection mode.
And there are no keywords in project data represented this information.

Dict from Trait: gom.Projection: 
{'__object_type__': 'gom.Projection', '__object_repr__': '<Trait: gom.Projection>', 'targets': 'test'}

For now I found one way to get this information, by comparison logic, but it doesn't working properly every time. 

 

Selection data (sequence \ command). <Trait: gom.Selection>
There are few information inside 'selection_targets' and 'selection_base_elements'.
I need selection command and used sequence data. Information doesn't belongs to one type of element, and needed from all types.
Standard project keywords doesn't represent any information about selections. 
I only can get now from np.array (element.selection.coordinate), coordinates, but not from all.

I general, how i can get any information from sources like these: 
'<Trait: gom.Projection>',
'<Trait: gom.Selection>', 
'<Trait: gom.CoordinateSystemGeometry>',
ets?

 

Maybe I lost something, and this variable exists somewhere? Is there a more 'pure' way to get this data?
What types of data contains array?  

Link to comment
Share on other sites

Hi,

unfortunately the answer is not nice: if the elements were created interactively we store the parametric usually in a binary format (which is faster, smaller and less error prone). And usually there is no way to access the different semantic data of this input parameter via script. Furthermore, even if you have created the elements via a script, we are allowed to convert this parametric at each point in time into a binary structure and we don't guarantee that you have an access to the scripted parametric (usually we don't do this, but it could happen if we have to migrate some parametric).

Therefore you should not rely on this possibility. May be you should ask yourself what is currently missing to achieve your goals? May be you can share your goals and there are more appropriate answers?!

Regards,

Bernd

Link to comment
Share on other sites

Please sign in to view this quote.

Bernd, Thank you for your reply. 


But this data is one of the key ones in my question. My goal is to create an independent interface for rebuilding elements with their dependencies.
.gxml \ .xml does not currently offer re-creation with dependencies, but offers compatibility with previous versions.
.gelements on the contrary, does what I need, but within the same version.

I still see some ways to solve this problem. But they will not be as clean as I would like, and will have a lot of extra calculations.

Thanks again for your reply. I would be glad if there are any recommendations.

Link to comment
Share on other sites

Hi,

if you are talking about concepts to create always the same pattern of element (depending on a nominal start element) we usually recommend a different way: User defined inspection principles
Are you familiar with this concept?

Regards,

Bernd

Link to comment
Share on other sites

Please sign in to view this quote.

Hello
Yes, familiar. This tool looks good, but it still not offer compatibility with previous versions (<2020).
UDIP from 2020 could be exported only in .package, not in .principle format.
Packages implemented in 2020+ version, I just checked it, packages from 2021 compatible with 2020, 2019 and older doesn't support this feature.
Target: export structure from 2021 (or any new version) to any other old version. This concept can work, but in the intervals before 19 and after 20. Maybe there are some special ways to get data from this packages, or there are the way to export .principle from 2020+?

I will try to check all options for getting data from UDIP.

Edited
Link to comment
Share on other sites

 Share

×
×
  • Create New...