Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

Excel GetObject finding the open instance of MicroStation running at the time of executing a macro

$
0
0

I am struggling with Excel GetObject finding the open instance of MicroStation running at the time of executing a macro. I have referenced my DLL using:

Declare Function mdlModelRef_loadReferenceModels Lib "stdmdlbltin.dll" (ByVal modelRef As Long, ByVal loadCache As Long, ByVal loadRasterRefs As Long, ByVal loadUndisplayedRefs As Long) As Long

However when I run:
Set myMSAppCon = GetObject(, "MicroStationDGN.ApplicationObjectConnector")
Set myMSApp = myMSAppCon.Application

Set mydgn = myMSApp.ActiveDesignFile
Set myModel = myMSApp.ActiveModelReference

I get an error 249: ActiveX component can't create object.

I am pretty inexperienced with MicroStation VBA so any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>