I am using two different VB.NET applications to work with AutoCAD. The first application, CADWorx Launch, is used to launch a drawing with a profile. I have tried two different methods as illustrated below.
1. - Call Shell( "C:\R2K8\acad.exe /P \\Acad3d\cadworx\Projects\1368320\Profiles\1368320_PIPE.arg", AppWinStyle.NormalFocus)
2. - Process.Start("C:\CADWorx_Lineinfo.bat")
The command string in the .bat file, C:\R2K8\acad.exe /P \\Acad3d\cadworx\Projects\1368320\Profiles\1368320_PIPE.arg, is the same as that used in the Shell command. Either method used is the final command before the .net application terminates and releases control to AutoCAD.
Once a drawing is loaded I use netload to execute a command, "LineSelect", from a different VB.NET application, CADWorx LineInfo, that will allow the designer to select a line and display the data associated with that line on a form in the .net application. The problem I am having is that if the drawing is opened via the CADWorx Launch application, regardless of whether I use the Shell method or the Process.Start method, the "LineSelect" command executed through netload is not recognized. However, if I open the drawing via C:\CADWorx_Lineinfo.bat from Windows Explore then use netload to execute the "LineSelect" command it is recognized and works as expected.
I have yet to figure it out what is interfering with the netload command when the drawing is opened via the CADWorx Launch application as opposed to opening it via the .bat file from Windows Explore. Any help would be appreciated. Thanks!