GRAPHISOFT®

Python APIVersion: 0.23 Beta

ClickElement

Ask the user to click an element.

def ClickElement () -> String

 

Parameters

 

Return Values

This function returns the GUID of the clicked element.

 

Remarks

This function is analogous to the APIIo_GetPointID function of the C++ API.

 

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, GetElementHeader
ClickPoint, ClickPoly

All functions