COM_connectRunningServer_ ( serverName As String, _
Optional reuseID As String = "", _
Optional onExitProperty As String = "", _
Optional autoRelease? As Boolean = True ) As User| Argument | Type | Description |
|---|---|---|
| serverName | String | ProgID string. Examples of some ProgIDs are: "Excel.Application" "Inventor.Application" Please see the relevant documentation on the COM model for your specific COM server. |
| reuseID | String | Optional; obsolete; default is "". |
| onExitProperty | String | Optional; obsolete; default is "". |
| autoRelease? | Boolean | Optional; if True this decrements the server's reference count when the COM server is released; default is True. |
Connects to running Inventor and retrieves the version string:
Method getInventorVersion() As String
Dim inventor As User = COM_connectRunningServer_("Inventor.Application")
Dim softwareVersion As User = COM_getProperty_( inventor, "SoftwareVersion")
Dim displayName As String = COM_getProperty_( softwareVersion, "DisplayName")
COM_releaseDispatch_( inventor)
Return displayName
End Method--> "2009 (Build 130236001, 236)"