hexagon logo

PCL; how to get reference csys id (CID) for CONM2 element?

Hello!
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.
 
This is piece of code I have:
 
db_get_current_group_id(group_id)
db_get_group_name( group_id,s_name )
   db_count_elems_in_group(group_id, num_elems)
SYS_ALLOCATE_ARRAY(elem_ids, 1, num_elems)
db_get_elem_ids_in_group(num_elems, group_id, elem_ids)
 
FOR (i=1 to num_elems)
eid(1) = elem_ids(i)
db_get_region_for_elements(1, eid, region_ids)
###get_CID
dump str_from_integer(eid(1)) // " - " // ###CID
 
END FOR 
 
Regards,
Adam
Parents
  • Hi Adam,
    I'm afraid it is reverse engineer them.
    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.
     
Reply
  • Hi Adam,
    I'm afraid it is reverse engineer them.
    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.
     
Children
No Data