set_objects_to_design#
- dlubal.api.rstab.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.
rstab_app.set_objects_to_design(
addon=rstab.DesignAddons.STEEL_DESIGN,
objects_to_design=rstab.ObjectsToDesignTable(rows=[
rstab.ObjectsToDesignRow(
object_type=rstab.ObjectType.OBJECT_TYPE_MEMBER,
role=rstab.ObjectsToDesignRow.Role.ROLE_DEFAULT,
design_all=False,
selected_objects=[1, 2],
removed_from_design=[2],
),
]),
)
// A row is addressed by its key: the object type and the role.
// Only the rows contained in the request are modified.
rstabApp.set_objects_to_design(
addon: Rstab.DesignAddons.SteelDesign,
objectsToDesign: new Rstab.ObjectsToDesignTable {
Rows = {
new Rstab.ObjectsToDesignRow {
ObjectType = Rstab.ObjectType.Member,
Role = Rstab.ObjectsToDesignRow.Types.Role.Default,
DesignAll = false,
SelectedObjects = { 1, 2 },
RemovedFromDesign = { 2 },
}
}
}
);