set_objects_to_design#

dlubal.api.rfem.Application.set_objects_to_design(self, *, addon, objects_to_design=None, skip_invalid_attributes=None, model_id=None)#

Set objects selected for design by a design addon. Only the rows contained in the request are modified, the remaining rows are left untouched. A row is addressed by ‘object_type’ and ‘role’; a request without a role addresses the default role of the object type. A list of objects replaces the whole column and an empty list leaves the column as it was. A list containing an object which does not exist is refused with an error, or left out and reported as a warning when ‘skip_invalid_attributes’ is set.

Parameters:
  • addon (DesignAddons) – The design addon whose table of objects to design is set.

  • objects_to_design (ObjectsToDesignTable | None) – Rows of the table which are to be modified, addressed by ‘object_type’ and ‘role’.

  • skip_invalid_attributes (bool | None) – Leaves out the values the model does not accept instead of refusing the whole request; they are reported as warnings.

  • model_id (ModelId | None) – Unique identifier of the model. Active model is used if this field is not set.

Method Type: Core


Usage

# A row is addressed by its key: the object type and the role.
# Only the rows contained in the request are modified.
rfem_app.set_objects_to_design(
    addon=rfem.DesignAddons.STEEL_DESIGN,
    objects_to_design=rfem.ObjectsToDesignTable(rows=[
        rfem.ObjectsToDesignRow(
            object_type=rfem.ObjectType.OBJECT_TYPE_MEMBER,
            role=rfem.ObjectsToDesignRow.Role.ROLE_DEFAULT,
            design_all=False,
            selected_objects=[1, 2],
            removed_from_design=[2],
        ),
    ]),
)

Examples