Dynamic property paletteΒΆ

If an extended dynamic layout of the property palette is needed, this can be implemented in the functions

initialize_control_properties is called before the property palette is displayed

def initialize_control_properties(build_ele     : BuildingElement,
                                  ctrl_prop_util: ControlPropertiesUtil,
                                  doc           : AllplanElementAdapter.DocumentAdapter) -> None:
    """ initialize the control properties

    Args:
        build_ele     : building element
        ctrl_prop_util: control properties utility
        doc           : document
    """

    ...

modify_control_properties is called after each change within the property palette

def modify_control_properties(build_ele     : BuildingElement,
                              ctrl_prop_util: ControlPropertiesUtil,
                              value_name    : str,
                              event_id      : int,
                              doc           : AllplanElementAdapter.DocumentAdapter) -> bool:
    """ modify the control properties

    Args:
        build_ele     : building element
        ctrl_prop_util: control properties utility
        value_name    : name(s) of the modified value (multiple names are separated by ,)
        event_id      : event ID
        doc           : document

    Returns:
        update the property palette is necessary: True/False
    """

    ...

    return ...

The modification of the control properties is executed by the usage of the ctrl_prop_util object. More information are shown here ControlPropertiesUtil