SendStringToExecute() problems

SendStringToExecute() problems

Anonymous
Not applicable
538 Views
2 Replies
Message 1 of 3

SendStringToExecute() problems

Anonymous
Not applicable
Hi, i have ARX in an MDI application with several child windows, each one encapsuled in an DocumentObject. I want to execute a command for every child, and i use sendStringToExecute(): the simplified problem is: for (all documentObjects) { AcApDocument* doc = documentObject.getDocument(); AcApDocManager()->setCurDocument(doc); sendStringToExecute(doc, "my_command", false, true, false); } The first strange thing is, that AutoCAD first runs through ALL objects doing a setCurDocument() for every document, and ONLY THEN starts to execute the "my_command" for every window, instead of executing every command immediately. The second strange thing is, that the execution order is inverted, that means, that "my_command" is executed first for the last element of the documentObjects list. ---- 1. Can i force sendStringToExecute() to execute immediately? 2. If not, how can i control the execution order? This is really tricky for me... Regards, Wolf.
0 Likes
539 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
cause isn't in the same queue. tipically the command sended via "command" follows the normal run of body program... the right way could be write real arx...in order to work syncrohonized. "Wolf" ha scritto nel messaggio news:40ed967c$1_1@newsprd01... > Hi, > > i have ARX in an MDI application with several child windows, each one > encapsuled in an DocumentObject. > > I want to execute a command for every child, and i use > sendStringToExecute(): > > the simplified problem is: > > for (all documentObjects) > { > AcApDocument* doc = documentObject.getDocument(); > AcApDocManager()->setCurDocument(doc); > sendStringToExecute(doc, "my_command", false, true, false); > } > > The first strange thing is, > that AutoCAD first runs through ALL objects doing a setCurDocument() > for every document, and ONLY THEN starts to execute the "my_command" > for every window, instead of executing every command immediately. > > The second strange thing is, > that the execution order is inverted, that means, that "my_command" is > executed > first for the last element of the documentObjects list. > > ---- > > 1. Can i force sendStringToExecute() to execute immediately? > 2. If not, how can i control the execution order? > > This is really tricky for me... > > Regards, > Wolf. > > > >
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hi Wolf,

maybe this topic can help you:
http://discussion.autodesk.com/thread.jspa?messageID=3996699ﰛ

ZaZy
0 Likes