hexagon logo

[PCL] How to get "bush orientation"? CSYS ID?

Hello!
I am trying to write a script which will list all FEM cbush elements and their orientation CSYS ID. What PCL function can extract this property from "region_id"?
  • Hi, good morning Adam
    I've attached a routine I have (I can't remember how much of it I wrote) to dump out props so I could understand what I needed. Hopefully you can run this to guide you in what your PCL needs to do.
    cheers, Arthur
     

    Attached Files (1)
  • Specifically for your CBUSHes, use db_get_prop_value with word_id = 4174. You can tell this is the word id you want by looking at the PCL issued when you create a cbush:
     
    elementprops_create( "cbush2", 89, 25, 20, 37, 2, 20, [4174, 4177, 4175, ... , ["Coord 1", "", "",....
     
    Sample cbushes - this one uses a vector for its orientation:
     
    db_get_prop_value(1, 4174, mat_id, data_type, integer_val, real_val, char_val, @
     coord_id, node_id, field_id)
     
    dump mat_id
    $# INTEGER mat_id = 0
    dump data_type
    $# INTEGER data_type = 2
    dump integer_val
    $# INTEGER integer_val = 0
    dump real_val
    $# REAL real_val(3) = [0., 1., 0.]
    dump char_val
    $# STRING char_val[31] = ""
    dump coord_id
    $# INTEGER coord_id = 0
    dump node_id
    $# INTEGER node_id = 0
    dump field_id
    $# INTEGER field_id = 0
     
    And one with a coord frame:
     
    dump mat_id
    $# INTEGER mat_id = 0
    dump data_type
    $# INTEGER data_type = 9
    dump integer_val
    $# INTEGER integer_val = 0
    dump real_val
    $# REAL real_val(3) = [0., 0., 0.]
    dump char_val
    $# STRING char_val[31] = ""
    dump coord_id
    $# INTEGER coord_id = 1
    dump node_id
    $# INTEGER node_id = 0
    dump field_id
    $# INTEGER field_id = 0