PropertyGroups.itemById Method

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Returns the specified property group from the collection using the unique ID of the property group. The ID is consistent and can't be modified by the user and isn't affected by localization.

Syntax

"propertyGroups_var" is a variable referencing a PropertyGroups object.
returnValue = propertyGroups_var.itemById(id)
"propertyGroups_var" is a variable referencing a PropertyGroups object.

#include <Core/Application/PropertyGroups.h>

returnValue = propertyGroups_var->itemById(id);

Return Value

Type Description
PropertyGroup Returns the specified PropertyGroup or null if the ID doesn't match a group within the collection.

Parameters

Name Type Description
id string The unique ID of the property group.

Samples

Name Description
Library item API Sample

Demonstrates using library items using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an saved user document with Library component(s). Create document, save it and insert Library item into the document. When running the script, have a that design open.

Version

Introduced in version January 2024