Quantcast
Channel: Product Communities
Viewing all articles
Browse latest Browse all 105279

Forum Post: Re: No model reference is active (V8i VB.net)

$
0
0

Patrick ...

Unless you tell us otherwise, your VB.NET appication is a .EXE.  When you use New MicroStationDGN.Application, you create a new instance of MicroStation.  That new instance doesn't have a DGN file open.  Whether or not another instance of MicroStation is already running is immaterial.

If you want to connect to an existing instance of MicroStation, you have to say so.  I don't use VB.NET so can't tell you what the code should be.

Alternative, create an AddIn.  An AddIn is a DLL that requires MicroStation to be up-and-running as the host process.  The benefit of operating that way is that (a) you're always in the current instance of MicroStation and (b) a DGN file is always open and so you will be able reliably to find the ActiveModelReference.

Why do you want to use VB.NET in preference to VBA?


Viewing all articles
Browse latest Browse all 105279

Trending Articles



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