• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

problem with autocad message engaged during command operations

  • Thread starter Thread starter tiziano69
  • Start date Start date

tiziano69

Guest
I have the following problem, from a vb6 form to autocad "activedocument.sendcommand "_line" & vbcr", I draw my lines but at a certain point, while I'm tracking the lines, vb6 returns me a message saying that the application, autocad is engaged, of course, in autocad I'm still traccindo the lines.

I can vary this waiting time, or suspend vb6 activities until autocad has completed its activities

private sub image1_click()
memorize_position
Unload me
set objacad = getobject(, "autocad.application")
appactivate objacad.caption
[Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep]
activedocument.sendcommand "tavoletta" & vbcr
end
 
doevents, suspends execution so that the operating system can process other events.

with this sub you can pause vba, seconds can also be tenths of a second.
sub sleep(second as single)
start = timer ' sets the start time.
do while timer < start + seconds
doevents ' passes control to other processes.
loop
end

by vba help; detect autocad status
sub example_isquiescent()
' this example gets the acadstate object and checks to see whether
autocad is in a quiescent state.
dim state as acadé
set state = getacadstate
if you are.
msgbox "autocad is quiescent."

msgbox "autocad is not quiescent."
end if
end

bye
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top