Classification¶
Read and manage classification systems and items, and inspect or change classifications assigned to elements, attributes and tool defaults.
Access this group through api.tapir.classification.
Commands¶
No commands match. Try another name or clear the filter.
For exceptions shared by Unified API commands, see error handling.
create_classification_items ¶
create_classification_items(
new_classification_items: list[NewClassificationItem],
) -> CreateClassificationItemsResult
Creates Classification Items in the given Classification Systems based on the given parameters.
Parameters:
-
new_classification_items(list[NewClassificationItem]) –Classification systems with items.
Returns:
create_classification_systems ¶
create_classification_systems(
classification_systems_with_items: list[
ClassificationSystemsWithItem
],
) -> CreateClassificationSystemsResult
Creates Classification Systems including Classification Items based on the given parameters.
Parameters:
-
classification_systems_with_items(list[ClassificationSystemsWithItem]) –Classification systems with items.
Returns:
delete_classification_items ¶
delete_classification_items(
classification_item_ids: list[
ClassificationItemIdArrayItem
],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Deletes the given Classification Items. With dryRun true nothing is deleted and no undo step is created: the response has dryRun set to true, and each classification item that exists gets wouldDelete.
Parameters:
-
classification_item_ids(list[ClassificationItemIdArrayItem]) –A list of classification item identifiers.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–One result for each input classification item, in the order of the input. On a dry run a classification item that exists gets wouldDelete; Archicad can still refuse to delete one that exists.
delete_classification_items_dry_run ¶
delete_classification_items_dry_run(
classification_item_ids: list[
ClassificationItemIdArrayItem
],
) -> DeleteClassificationItemsResult
Preview this command without applying its changes. Deletes the given Classification Items. With dryRun true nothing is deleted and no undo step is created: the response has dryRun set to true, and each classification item that exists gets wouldDelete.
Parameters:
-
classification_item_ids(list[ClassificationItemIdArrayItem]) –A list of classification item identifiers.
Returns:
delete_classification_systems ¶
delete_classification_systems(
classification_system_ids: list[
ClassificationSystemIdArrayItem
],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Deletes the given Classification Systems. With dryRun true nothing is deleted and no undo step is created: the response has dryRun set to true, and each classification system that exists gets wouldDelete.
Parameters:
-
classification_system_ids(list[ClassificationSystemIdArrayItem]) –A list of classification system identifiers.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–One result for each input classification system, in the order of the input. On a dry run a classification system that exists gets wouldDelete; Archicad can still refuse to delete one that exists.
delete_classification_systems_dry_run ¶
delete_classification_systems_dry_run(
classification_system_ids: list[
ClassificationSystemIdArrayItem
],
) -> DeleteClassificationSystemsResult
Preview this command without applying its changes. Deletes the given Classification Systems. With dryRun true nothing is deleted and no undo step is created: the response has dryRun set to true, and each classification system that exists gets wouldDelete.
Parameters:
-
classification_system_ids(list[ClassificationSystemIdArrayItem]) –A list of classification system identifiers.
Returns:
get_all_classification_systems ¶
get_all_classification_systems() -> list[
ClassificationSystemSummary
]
Returns the classification systems of the project with their guid, name, description, source, version and date. Same output as the official GetAllClassificationSystems command, so scripts can rely on Tapir commands only.
Returns:
-
list[ClassificationSystemSummary]–The classification systems of the project.
get_classification_item_parents ¶
get_classification_item_parents(
classification_item_ids: list[
ClassificationItemIdArrayItem
],
) -> list[ClassificationItemParent | ErrorItem]
Returns the parent item and the classification system of the given Classification Items; a top level item has no parent. The output is aligned with the input array of items.
Parameters:
-
classification_item_ids(list[ClassificationItemIdArrayItem]) –A list of classification item identifiers.
Returns:
-
list[ClassificationItemParent | ErrorItem]–The parent and the system of each given item, in the order of the input. A non-existing item is an error item.
get_classification_item_visibility ¶
get_classification_item_visibility(
targets: list[
AttributeIdArrayItem
| ClassificationVisibilityToolDefault
| ElementIdArrayItem
],
classification_item_ids: list[
ClassificationItemIdArrayItem
],
) -> list[ClassificationItemVisibilities | ErrorItem]
Tells whether the given classification items are visible (offered) for the given elements, element tool defaults and attributes, such as building materials. Non-existing targets and classification items are reported as errors. Visibility does not tell whether the target is classified with the item, and an item can be visible even if its parent item is not.
Parameters:
-
targets(list[AttributeIdArrayItem | ClassificationVisibilityToolDefault | ElementIdArrayItem]) –The elements, element tool defaults and attributes to check the classification items for.
-
classification_item_ids(list[ClassificationItemIdArrayItem]) –A list of classification item identifiers.
Returns:
-
list[ClassificationItemVisibilities | ErrorItem]–One entry per target, in the order of the input. A non-existing element or attribute, or an invalid element type, is represented by an error object.
get_classification_of_attributes_in_system ¶
get_classification_of_attributes_in_system(
attribute_ids: list[AttributeIdArrayItem],
classification_system_id: ClassificationSystemId,
) -> list[ClassificationIdArrayItem | ErrorItem]
Returns the classification of the given attributes (for example Building Materials) in the given classification system. classificationItemId is omitted for an unclassified attribute.
Parameters:
-
attribute_ids(list[AttributeIdArrayItem]) –A list of attributes.
-
classification_system_id(ClassificationSystemId) –
Returns:
-
list[ClassificationIdArrayItem | ErrorItem]–Order of the items is the same as in the input. classificationItemId is omitted when the attribute is unclassified in the system. Non-existing attributes or a non-existing classification system are represented by error objects.
get_classifications_of_attributes ¶
get_classifications_of_attributes(
attribute_ids: list[AttributeIdArrayItem],
) -> list[AttributeClassifications | ErrorItem]
Returns the classifications of the given attributes (building materials, composites, surfaces, etc.) in every classification system they are classified in.
Parameters:
-
attribute_ids(list[AttributeIdArrayItem]) –A list of attributes.
Returns:
-
list[AttributeClassifications | ErrorItem]–The classifications of the attributes, in the order of the input. A non-existing attribute is represented by an error object.
get_classifications_of_element_defaults ¶
get_classifications_of_element_defaults(
element_types: list[ElementType],
classification_system_ids: list[
ClassificationSystemIdArrayItem
],
) -> list[ElementClassificationItemArray | ErrorItem]
Returns the classification of the tool defaults (the settings new elements get) of the given element types in the given classification systems.
Parameters:
-
element_types(list[ElementType]) –The element types whose tool defaults (the settings new elements get) are read.
-
classification_system_ids(list[ClassificationSystemIdArrayItem]) –A list of classification system identifiers.
Returns:
-
list[ElementClassificationItemArray | ErrorItem]–Order of the outer list is that of the given element types, the inner list that of the given classification systems. Invalid element types or non-existing classification systems are represented by error objects.
get_classifications_of_elements ¶
get_classifications_of_elements(
elements: list[ElementIdArrayItem],
classification_system_ids: list[
ClassificationSystemIdArrayItem
],
) -> list[ElementClassificationItemArray | ErrorItem]
Returns the classification of the given elements in the given classification systems. It works for subelements of hierarchal elements also.
Parameters:
-
elements(list[ElementIdArrayItem]) –A list of elements.
-
classification_system_ids(list[ClassificationSystemIdArrayItem]) –A list of classification system identifiers.
Returns:
-
list[ElementClassificationItemArray | ErrorItem]–Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects.
get_classifications_of_tool_defaults ¶
get_classifications_of_tool_defaults(
element_types: list[ElementType],
) -> list[ErrorItem | ToolDefaultClassifications]
Returns every classification of the tool defaults (the settings new elements get) of the given element types, in all classification systems at once. Unlike GetClassificationsOfElementDefaults it needs no list of classification systems; systems in which a default is unclassified are left out.
Parameters:
-
element_types(list[ElementType]) –The element types whose tool defaults (the settings new elements get) are read.
Returns:
-
list[ErrorItem | ToolDefaultClassifications]–The classifications of the tool defaults of each element type, in the order of the given element types. Invalid element types are represented by error objects.
get_elements_by_classification ¶
get_elements_by_classification(
classification_item_ids: list[
ClassificationItemIdArrayItem
],
) -> list[ClassificationItemElements | ErrorItem]
Returns the elements classified with the given classification items, one list per item, so elements can be filtered by classification in a single call.
Parameters:
-
classification_item_ids(list[ClassificationItemIdArrayItem]) –A list of classification item identifiers.
Returns:
-
list[ClassificationItemElements | ErrorItem]–The elements classified with each classification item, aligned with the input, or an error for a non-existing classification item.
import_classifications_xml ¶
import_classifications_xml(
xml: str,
system_conflict_policy: ClassificationSystemConflictPolicy,
item_conflict_policy: ClassificationItemConflictPolicy,
) -> ImportClassificationsXmlResult
Imports a Classification Manager XML export, with the given policies for systems and items that already exist. Returns the systems and items it created and removed.
Parameters:
-
xml(str) –A Classification Manager export (XML) to import.
-
system_conflict_policy(ClassificationSystemConflictPolicy) – -
item_conflict_policy(ClassificationItemConflictPolicy) –
Returns:
set_classifications_of_attributes ¶
set_classifications_of_attributes(
attribute_classifications: list[
AttributeClassification
],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Sets the classifications of attributes (building materials, composites, surfaces, etc.). The given item replaces the attribute's current item in the same classification system. In order to set the classification of an attribute to unclassified in a system, omit the classificationItemId field.
Parameters:
-
attribute_classifications(list[AttributeClassification]) –The classifications to set, one per attribute and classification system.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
set_classifications_of_element_defaults ¶
set_classifications_of_element_defaults(
element_default_classifications: list[
ElementDefaultClassification
],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Sets the classifications of the tool defaults (the settings new elements get) of the given element types. In order to set a default to unclassified, omit the classificationItemId field.
Parameters:
-
element_default_classifications(list[ElementDefaultClassification]) –The classifications to set on the tool defaults (the settings new elements get).
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
set_classifications_of_elements ¶
set_classifications_of_elements(
element_classifications: list[ElementClassification],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Sets the classifications of elements. In order to set the classification of an element to unclassified, omit the classificationItemId field. It works for subelements of hierarchal elements also. Archicad refuses to classify an element on a hidden layer; the error then says so. With dryRun true nothing is changed and no undo step is created: the response has dryRun set to true, and each item that passes the checks made before writing gets wouldChange, with the element's classification in the system now (oldValue) and the one a real run would set (newValue).
Parameters:
-
element_classifications(list[ElementClassification]) –A list of element classification identifiers.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–One result for each item of elementClassifications, in the order of the input. On a dry run an item that passes every check made before writing (the classification item and its system exist, the element's classification in that system can be read) gets wouldChange: oldValue is the element's classificationId in the system now and newValue the one a real run would set, both as GetClassificationsOfElements gives them (without classificationItemId when the element is or would be unclassified in the system). Archicad can still refuse an item that passes them.
set_classifications_of_elements_dry_run ¶
set_classifications_of_elements_dry_run(
element_classifications: list[ElementClassification],
) -> SetClassificationsOfElementsResult
Preview this command without applying its changes. Sets the classifications of elements. In order to set the classification of an element to unclassified, omit the classificationItemId field. It works for subelements of hierarchal elements also. Archicad refuses to classify an element on a hidden layer; the error then says so. With dryRun true nothing is changed and no undo step is created: the response has dryRun set to true, and each item that passes the checks made before writing gets wouldChange, with the element's classification in the system now (oldValue) and the one a real run would set (newValue).
Parameters:
-
element_classifications(list[ElementClassification]) –A list of element classification identifiers.
Returns:
update_classification_items ¶
update_classification_items(
classification_items: list[ClassificationItemUpdate],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Updates the id (code), name and/or description of existing Classification Items, keeping their guid and so the elements classified with them. Items cannot be moved to another parent.
Parameters:
-
classification_items(list[ClassificationItemUpdate]) –The classification items to update. Only the fields given change; items keep their guid and their parent.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
update_classification_systems ¶
update_classification_systems(
classification_systems: list[
ClassificationSystemUpdate
],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Updates the name, description, source, version and/or date of existing Classification Systems, keeping their guid.
Parameters:
-
classification_systems(list[ClassificationSystemUpdate]) –The classification systems to update. Only the fields given change.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
Related types¶
These include the parameter and result models used inside the client. The command signatures above show what to pass and what is returned.
CreateClassificationItemsParametersCreateClassificationItemsResultCreateClassificationSystemsParametersCreateClassificationSystemsResultDeleteClassificationItemsParametersDeleteClassificationItemsResultDeleteClassificationSystemsParametersDeleteClassificationSystemsResultGetAllClassificationSystemsResultGetClassificationItemParentsParametersGetClassificationItemParentsResultGetClassificationItemVisibilityParametersGetClassificationItemVisibilityResultGetClassificationOfAttributesInSystemParametersGetClassificationOfAttributesInSystemResultGetClassificationsOfAttributesParametersGetClassificationsOfAttributesResultGetClassificationsOfElementDefaultsParametersGetClassificationsOfElementDefaultsResultGetClassificationsOfElementsParametersGetClassificationsOfElementsResultGetClassificationsOfToolDefaultsParametersGetClassificationsOfToolDefaultsResultGetElementsByClassificationParametersGetElementsByClassificationResultImportClassificationsXmlParametersImportClassificationsXmlResultSetClassificationsOfAttributesParametersSetClassificationsOfAttributesResultSetClassificationsOfElementDefaultsParametersSetClassificationsOfElementDefaultsResultSetClassificationsOfElementsParametersSetClassificationsOfElementsResultUpdateClassificationItemsParametersUpdateClassificationItemsResultUpdateClassificationSystemsParametersUpdateClassificationSystemsResultAttributeClassificationAttributeClassificationsAttributeIdArrayItemClassificationIdArrayItemClassificationItemConflictPolicyClassificationItemElementsClassificationItemIdArrayItemClassificationItemParentClassificationItemUpdateClassificationItemVisibilitiesClassificationSystemConflictPolicyClassificationSystemIdClassificationSystemIdArrayItemClassificationSystemSummaryClassificationSystemUpdateClassificationSystemsWithItemClassificationVisibilityToolDefaultElementClassificationElementClassificationItemArrayElementDefaultClassificationElementIdArrayItemElementTypeErrorItemExecutionResultFailedExecutionResultNewClassificationItemSuccessfulExecutionResultToolDefaultClassifications