Greetings,
I see the following error when I attempt to launch AutoCAD via F5 debugging from Visual Studio:
Error while trying to run project: Unable to start program '...path...\acad.exe'.
Input or output cannot be redirected because the specified file is invalid.
The path to the executable is correct. I tried launching with and without the command line args: "/p <<VANILLA>>" to no avail.
I'm running AutoCAD 2011, VS2010 Ultimate, 64-bit Win 7, .NET 3.5, C#
Any ideas? Thanks!
Both AutoCAD and Visual Studio hang if I attach the debugger after AutoCAD is launched (either before or after a NETLOAD).
I have fresh installs of AutoCAD, Visual Studio, Windows 7. This is a new box.
Again, thanks!
Hi,
have you set the path to AutoCAD enclosed in quotations marks?
Show us a screenshot of your project-settings/tab debug or upload the CSPROJ-file (there are also the settings for debugging saved.
- alfred -
The "Start external program" text box won't accept a quote delimited path/file. I also tried a shortened 8.3 path.
The program couldn't be simpler:
namespace AutoCadLibrary { public class ScratchPad { [CommandMethod("HelloWorld")] public void HelloWorld() { Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; ed.WriteMessage("\nHello World 1"); } } }
Thanks for your help
Hi,
sorry, you are right, no quotes in "start ..."
Is drive D in your case a internal harddisk, an external or a network-drive?
Do you have write-access to the directory?
Do you have any AntiVirus or defender or ... running?
One idea I have is: create a batch-file, placed on C-drive (thats now your start-prog for vs) and in this place the line to start AutoCAD. (just as a test for differences between C: and D:)
- alfred -
I tried launching AutoCAD indirectly via a batch file; but I got this exception:
External Program Path:
We can only debug an EXE file. Please enter a valid executable.
Hi,
and the other 3 questions?
- alfred -
My harddrive's are both internal. AutoCAD is installed on one harddrive and my visual studio projects are located on another. I do have write access the acad.exe path. I'm an admin on this machine.
We run LANDesk antivirus here. But I disabled it.
Hi,
what happens if you compile your project, start AutoCAD and _NETLOAD your DLL? Does this work?
Have you tried to open any of the samples from the ObjectARX-kit?
Sorry, the number of ideas I have goes to 0 ;(
- alfred -
I'm able to netload a dll and run a command. But I'm not able to launch AutoCAD from Visual Studio and attaching to a running instance of AutoCAD freezes it as well as Visual Studio.
I got this fixed by changing the command line arguments from
/p <<VANILLA>>
to
/p "<<VANILLA>>"
That's all it took.