Quantcast
Channel: OpenRoads | OpenSite Forum - Recent Threads
Viewing all articles
Browse latest Browse all 19084

InRoads cannot be started if our Add-on is configured to load on launching.

$
0
0

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;

        }


Viewing all articles
Browse latest Browse all 19084

Trending Articles



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