Reads the COM property on IDispatch interface. COM property is identified by the string name. Returns the property value as an Any data type.
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. |
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
--> "Deep Blue"