How to add your knowledge

COM_getProperty_()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1

    Synopsis

    Reads the COM property on IDispatch interface. COM property is identified by the string name. Returns the property value as an Any data type.

    Syntax

    COM_getProperty_ ( serverHandle As User, _
                        prop As String, _
                        Optional reuseID As String = "", _
                        Optional checkArguments? As Boolean = False, _
                        ... indices As Any ) As Any
    Argument Type Description
    serverHandle User IDispatch pointer
    prop String Property name
    reuseID String Optional; obsolete; default is "".
    checkArguments? Boolean Optional; checks the validity of the indices if True; default is False. Note that simple property calls do not have indices.
    indices Any Optional; additional arguments (indices) for the property. If the underlying IDispatch refers to a collection, then this argument is used as index to retrieve individual items.

    Example 1

    Get the color scheme name with the index of 1 by connecting to the running Inventor, and making a call similar to ThisApplication.ColorSchemes(1).Name

    Method getColorScheme1Name() As String 
        Dim inventor As User = COM_connectRunningServer_("Inventor.Application") 
        Dim colorScheme As User = COM_getProperty_(inventor, "ColorSchemes", checkArguments? := True, 1)
        Dim displayName As String = COM_getProperty_( colorScheme, "Name")
        COM_releaseDispatch_( inventor)
        Return displayName 
    End Method 
    		

    Output:

    --> "Deep Blue"