How to hide and grey out user-defined attributes
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
Is it possible to hide or grey out user-defined attributes in objects.inp?
Answer:
Yes, it is possible with the
See the examples below:
See also
Example: Dim unavailable options
Is it possible to hide or grey out user-defined attributes in objects.inp?
Answer:
Yes, it is possible with the
toggle_field
definition. Add the toggle_field
definition to the end of the attribute definition whose values affect other attributes. The format istoggle_field:[!]field1=gray_out_value1,gray_out_value2;
See the examples below:
Grey out
When the user selects the first item (first item in the list is always 0, second in the list is 1, etc. ) in the element weight (ELEMENT_WEIGHT) list, then the unit weight (UNIT_WEIGHT) attribute is greyed out.attribute("ELEMENT_WEIGHT", "", option,"%s", no, none, "0.0", "0.0",250,650,200, "toggle_field:UNIT_WEIGHT=0")
Hide
In this example, the form thickness (C_FORM_THICKNESS) field is hidden (!) when the form material (C_FORM_MATERIAL) is selected to be the first (0), third (2) or fourth (3) option in the list. Form thickness stays visible only when the second (1) option, Plywood, is selected.attribute("C_FORM_MATERIAL", "j_Form_material", option, "%s", yes, none, "0.0", "0.0",374, 196, 160, "toggle_field:!C_FORM_THICKNESS=0,2,3")
Image
Image
Pictures
“toggle_field:!dia_part_move_end_1.xbm=1”
See also
Example: Dim unavailable options