I created a group with CONM2 elements. I would like to printout CID for each EID. I cannot figure out how to go from region ID to specific property field.
note I shifted the db_get_region_for_elements outside the num_elems for loop for efficiency reason, minimise the number of db calls. I wanted to reduce the element_region_ids to the unique ones to minimise the db_get_prop_value calls but nothing sprang to mind on how to then efficiently expand it back for each element, so I couldn't see anything to gain by doing this.
I haven't run this as it stands so there may be some errors in it.
for this example I started by getting the props and and then dumping out the prop words and their values to identify the prop word that corresponded to the data I had input in the gui. Having identified it as 4001 I then changed the code to work just that one word. With hindsight I should have kept the loops to anticipate this question, I'll put it together again for you(but it wont be immediate) unless you get there first.