hallo,
die folgende erklärung fand ich zur SENDCOMMAND-methode:
-----------
Sends a command string from a VB or VBA application to the document for processing.
Signature
object.SendCommand(Command)
Object Document
The object or objects this method applies to.
Command String; input-only
The command to send to the document.
Remarks
This method processes any AutoCAD command-line function, including LISP expressions.
If the drawing specified is not active, it will be made active.
This method is generally synchronous. However, if the command sent with this method requires any user interaction (such as picking a point on the screen), then this method will return as soon as the user input begins. The command will then continue to be processed asynchronously.
When this method is called from an event handler it is processed asynchronously.
You should never use this method to issue a command for which there is an ActiveX method available. For example, do not use SendCommand "VBALOAD ". Instead, use the LoadDVB method.
--------------
Besonders interessant ist die erläuterung von synchroner und asynchroner verarbeitung von acad-befehlen, die durch sendcommand ausgelöst werden
FRAGE:
gibt es eine möglichkeit, die SYNCHRONE verarbeitung zu ERZWINGEN, so daß ein
ThisDrawing.SendCommand ("linie ")
tatsächlich erst ausgeführt wird, auch ohne daß die eingabe-punkte an vba zrückgegeben werden und BEVOR der nächste vba befehl ausgeführt wird!
(Anmerkung: Sicherlich kann man ThisDrawing.Utility.GetPoint verwenden, die punkte in WKS-koordinaten umrechnen und anschließend mit Prompt zurückgeben oder ähnliches; das geht aber nur, wenn man wie bei LINIE genau weiß, was gefragt ist UND außerdem ist das ein sehr großer aufwand)
danke, bs
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP