get_object_id_list#

dlubal.api.rsection.Application.get_object_id_list(self, *, object_type=None, parent_no=None, model_id=None)#

Retrieves object ids filtered by a specific type. If you want to retrieve all object ids, do not specify the object_type.

Parameters:
  • object_type (ObjectType | None) – The type of objects to retrieve. To get all object ids, omit it.

  • parent_no (int | None) – Unique identifier of the parent object. Omit this parameter if the object type does not have a parent or you want to get result for all parent objects.

  • model_id (ModelId | None) – Unique identifier of the model. If not specified, the active model is used.

Returns:

ObjectIdList

Method Type: Core


Usage

# Get object ID list
object_id_list = rsection_app.get_object_id_list()

# Iterate through object IDs and print their types and IDs
for obj in object_id_list.object_id:

    object_id = obj.no
    object_type = obj.object_type

    print(f"{rsection.ObjectType.Name(object_type)}: {object_id}")

Output

OBJECT_TYPE_MATERIAL: 1
OBJECT_TYPE_SECTION: 1000000
OBJECT_TYPE_OBJECT_SNAP: 1
OBJECT_TYPE_MEMBER_CONFIGURATION: 1
OBJECT_TYPE_MEMBER_CONFIGURATION: 2
OBJECT_TYPE_POINT: 1
OBJECT_TYPE_POINT: 2
OBJECT_TYPE_POINT: 3
OBJECT_TYPE_POINT: 4
OBJECT_TYPE_POINT: 5