get_object_id_list#
- dlubal.api.rstab.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:
 
Method Type: Core
Usage
# Get object ID list
object_id_list = rstab_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"{rstab.ObjectType.Name(object_type)}: {object_id}")
// Get object ID list
var objectIdList = await RstabApp.get_object_id_list();
// Iterate through the object IDs
foreach (var obj in objectIdList.ObjectId)
{
    var objectId = obj.No;
    var objectType = obj.ObjectType;
    Console.WriteLine($"{objectType}: {objectId}");
}
Output
OBJECT_TYPE_MATERIAL: 1
OBJECT_TYPE_MATERIAL: 2
OBJECT_TYPE_MATERIAL: 3
OBJECT_TYPE_SECTION: 1
OBJECT_TYPE_SECTION: 2
OBJECT_TYPE_SECTION: 3
OBJECT_TYPE_SECTION: 4
OBJECT_TYPE_THICKNESS: 1
OBJECT_TYPE_NODE: 1
OBJECT_TYPE_NODE: 2
OBJECT_TYPE_NODE: 3
OBJECT_TYPE_NODE: 4
OBJECT_TYPE_NODE: 5