Author Topic: Extra "" Really Screws Up .NET Project  (Read 1167 times)

0 Members and 1 Guest are viewing this topic.

Bill Tillman

  • Guest
Extra "" Really Screws Up .NET Project
« on: May 13, 2015, 05:09:30 PM »
I have a LISP program which creates a drawing with loads of objects. Works great for years. What I would notice while watching it run would be that the original command "APS" which runs the LISP code would be repeated and I see  "unknown command APS" on the command line. When this runs on it's own it's okay. The drawing finishes and closes as planned.

Okay so the day has come when the client wants to automate this further, so I'm running it from a C# .NET project which simply opens AutoCAD, loads the LISP code, injects values for a bunch of variables and then takes off. Worked great until I selected on particular LISP file which turns out I had an extra "" in it. It took me some time but I eventually found the offending line which was a DIMCONTINUE command. It's working now but what I can't understand is why when the LISP was running on it's own, all I'd get was that "unknown command APS" message but the drawing finished. When it's run from the C# project, AutoCAD keeps interpreting the "" as run it again, and it would go into an endless loop redrawing the entire drawing. And each time it did, it go the extra "" and would just keep on running.

The C# code has long time ago let go of control. In fact it's actually stopped AFAIK and AutoCAD continues on it's own. This is a COM project, not internal to AutoCAD project.