[De...] Posted May 31, 2023 Share Posted May 31, 2023 Hi, Is there anyway to .get('Related_elements')? ie. lets say I have a Local Coordinate System with a few dependent elements. Is there a way to access those related elements in the script editor? I've searched through all the keywords and wasnt able to come up with much. Some Pictures Below to help clarify: Link to comment Share on other sites More sharing options...
[Ja...] Posted June 1, 2023 Share Posted June 1, 2023 Hi, you can get a list of the currently shown content with something like this: for x in gom.ElementSelection({'category': ['key', 'related']}): print (x.name) Maybe this helps? Regards, Jan Link to comment Share on other sites More sharing options...
[De...] Posted June 2, 2023 Author Share Posted June 2, 2023 That's exactly what I'm looking for !! & seems to work perfect if I have the element selected in the explorer. but in a normal script/program I'm not going to have that element 'selected'. can I pass a specific element into that gom.ElementSelection function? eg. I'm trying to find all nominal sections related to coordinate system 'LCS' I tried to print( gom.ElementSelection.__doc__ ) but it returned None =( Link to comment Share on other sites More sharing options...
[Ja...] Posted June 5, 2023 Share Posted June 5, 2023 Unfortunately, that is currently not possible. The wish to do that is recorded in our internal ticket system, but I cannot tell you if and when it will be implemented. However, you can use this command to explicitly select an element via scripting: gom.script.explorer.apply_selection(selection=[gom.app.project.inspection['LCS']]) Regards, Jan Link to comment Share on other sites More sharing options...
[De...] Posted June 5, 2023 Author Share Posted June 5, 2023 That'll work! Thank you So much for the help!! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in