View Single Post
Join Date: May 2008
Posts: 538
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 86
Murtan Murtan is offline Offline
Posting Pro

Re: Problem with C# and AutoCAD

 
0
  #2
Nov 30th, 2008
I don't know what your problem is in particular, but it may be that you need to allow autocad some time to process the first command before it is ready to accept the second command.

Alternatively if you are using OLE or COM to interface with AutoCAD, you need to follow their conventions. Do you need to request status or completion status after you send the command before you can send another command?

It appears that you are using a keystroke driven interface for at least part of your control. I can't tell if SendCommand is a keystroke interface or an OLE interface, but I know SendKeys is a keystroke interface.

If SendCommand is not a keystroke interface, it would probably be in your best interest to pick a SINGLE method of interaction with AutoCAD and not try to mix metaphors.

If you are using a keystroke interface, I recall that some applications like to 'clear the keyboard buffer' prior to prompting for a new command. If AutoCAD is written this way, you will need to make sure you are not sending keystrokes to AutoCAD until it has re-prompted for a command or they will be discarded.

See if any of the above gives you a new way to look at your problem.
Reply With Quote