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

[MSCE update 13 C++/C#] How can Addin still works after switch to new file

$
0
0

Hi,

I am working on an C# Addin Project.

Here is my situation.

On some condition, I need to change to new file to continue work flow, but I found that if I change to new file, the dgn tools does not woks anyway.

for example:

This sample code woks fine, I can activate the dgn tool.

...
Do some thing...
DgnTool.InstallTool();
...

This sample code does not activate the dgn tool

...
Do some thing...

Bentley.Interop.MicroStationDGN.Application app = Bentley.MstnPlatformNET.InteropServices.Utilities.ComApp;
app.ActiveDesignFile.Save();
app.ActiveDesignFile.Close();
app.OpenDesignFile(toOpenDgnFile, false);

DgnTool.InstallTool();//Does not activate the dgn tool
...

So, how can I activate the dgn tool after switch to new file?

Thanks.


Viewing all articles
Browse latest Browse all 4331


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