hexagon logo

String Length of db_get_beam_section_name()

db_get_beam_section_name() is not documented. It seems to truncate the returned names to 32 characters. Can this be confirmed?
 
I set the value using elementprops_modify() through the property_data string (max 256 per docs).
 
If the case of character limit, is there an alternate method to extract the beam section name.
 
Thx. Mitch.
  • Hi,
    I'm puzzled because I thought the limit was probably 31/32 characters. The beam library cross section tool truncates the name at 31characters, as when I interactively use a very long name in the gui it is truncated to this:
    beam_section_create( "ajh_beam_section_789_1234567893", "TUBE", ["5", "4"] )
     
    The documentation for the beam_section_create says the beam_name is [31].
     
    If I use
    beam_section_create( "ajh_beam_section_789_1234567893456789new", "TUBE", ["5", "4"] )
    it gets truncated as the response is:
    $# Beam Section "ajh_beam_section_789_12345678934" created.
    Note I got one more character than the gui allowed. but that is a common issue with 32/31 limits on names.
    How did you create a long name in the first place?
     
    regards
    Arthur
  • The name is initially set with "I set the value using elementprops_modify() through the property_data string (max 256 per docs)." The name to set to is provided from our external beam library.
     
    I guess this as a general function supports different targets? It is not surprising that the name length is 31/32 like group names.
     
    We have found workaround by stripping some trailing zeros out of the name parsing. We must live with the 31 character limit I guess, like with group names.
     
    Thx.
  • Apologies I misunderstood your initial comment, inferring that you were doing a modify of one that had already been created. Yes we are stuck with the 31 character name lengths. It would be nice if it could be increased by a few multiples.
    Arthur