GetElementPropertyDefinitionDictionary
Retrieves all of the property definitions that are available for an element.
def GetElementPropertyDefinitionDictionary (elemGuid, filterID) -> Dict (String, APIObject)
Parameters
- elemGuid
- [in] GUID of an Element.
- filterID
- [in] Use this to filter Property Definitons. See API_PropertyDefinitionFilter for available filters.
Return Values
A dictionary containing the available Property Definitions belong to the given Element. Keys of the items are the GUIDs of the property definitions.
Remarks
This function is analogous to the ACAPI_Element_GetPropertyDefinitions function of the C++ API.
For information on how to interpret the returned APIObject dictionary values, visit the C++ documentation.
Example
# Set clicked element's properties to default elem = ClickElement () with UndoScope ("Set Element Properties to Default"): for d in GetElementPropertyDefinitionDictionary (elem, API_PropertyDefinitionFilter_UserDefined).values (): if d.canValueBeEditable and d.defaultValue.hasExpression == False: p = GetElementProperty (elem, d.guid) if p.isDefault == False: p.isDefault = True SetElementProperty (elem, p) print("Changed \"{}\" property to it's default value.".format (d.name))
Requirements
- Version: Python API 0.1 or Later
- Module: GS
See Also
GetElementList
GetElementProperty,
SetElementProperty,
AddElementProperty,
DeleteElementProperty