AGI AgAttrAutomationSend comments on this topic.
AddChoicesDispatchProperty Method (IAgAttrBuilder)
See Also
DispScope
The attribute container (scope) where the attribute will be added.
Name
Name of the attribute to add.
Description
Description of the attribute to add.
PropName
Name of the property to be called to set/get the value of this attribute. The property must be of the same type as that of the values in the array.
Choices
Choices is a SAFEARRAY of variants that provides a selection combo box in the configuration user interface.
Windows





Windows & Linux

Description

Add an Attribute that provides a combobox of values from which the user can choose. It is recommended that any name used for these configuration properties not include spaces because certain interfaces to the properties may not work correctly.

Syntax

[Visual Basic .NET]
Public Sub AddChoicesDispatchProperty( _
    ByVal DispScope As Object, _
    ByVal Name As String, _
    ByVal Description As String, _
    ByVal PropName As String, _
    ByVal Choices As System.Array _
)
[C#]
public void AddChoicesDispatchProperty(
    Object DispScope,
    string Name,
    string Description,
    string PropName,
    System.Array Choices
);
[Managed C++]
public: void AddChoicesDispatchProperty(
    IUnknown ^ DispScope,
    String __gc ^ Name,
    String __gc ^ Description,
    String __gc ^ PropName,
    System::Array Choices
);
[Unmanaged C++]
public: HRESULT AddChoicesDispatchProperty(
    IUnknown * DispScope,
    BSTR Name,
    BSTR Description,
    BSTR PropName,
    SAFEARRAY * Choices
);
[Java]
public void addChoicesDispatchProperty(
    Object DispScope,
    String Name,
    String Description,
    String PropName,
    AgSafeArray Choices
);
[Python - STK API ]
def AddChoicesDispatchProperty(self, DispScope:"IDispatch", Name:str, Description:str, PropName:str, Choices:list) -> None:

Parameters

DispScope
The attribute container (scope) where the attribute will be added.
Name
Name of the attribute to add.
Description
Description of the attribute to add.
PropName
Name of the property to be called to set/get the value of this attribute. The property must be of the same type as that of the values in the array.
Choices
Choices is a SAFEARRAY of variants that provides a selection combo box in the configuration user interface.

See Also

© 2025 Analytical Graphics, Inc. All Rights Reserved.