Hi there,
We have trouble to start InRoads if we configured our own C# Add-on to start when launching MicroStation. The InRoads application just quit without any error.
MicroStation can be started without issue with our Add-on.
Would anyone check what's wrong with it? Thanks in advance.
Best,
Gang
Here is the content of our cfg file:
MS_ADDINPATH > c:\test\
MS_MDLAPPS > c:\test\
MS_INITAPPS > LoaderTest
MS_DGNLIBLIST > c:\test\Toolbox.DGNLIB
The overridden method in the Loader class is as following:
protected override int Run(System.String[] commandLine)
{
s_comApp = BMI.Utilities.ComApp;
if (commandLine.Length >= 5 && commandLine[1] == "MS_INITAPPS" && commandLine[3] == "-automation" && commandLine[4] == "-Embedding")
{
return 0;
}
if (commandLine[1] == "MS_INITAPPS")
{
mdlSystem_enterGraphicsExtended(0);
if (commandLine.Length >= 4)
{
if (FileHelper.FileExists(commandLine[3]))
{
s_comApp.OpenDesignFile(commandLine[3]);
}
}
else
{
BMI.Utilities.ComApp.CadInputQueue.SendKeyin("DIALOG OPENFILE STARTUP");
}
}
return 0;
}