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

(command "_.zoom" not working in the lisp

  • Thread starter Thread starter Dr.Lube
  • Start date Start date

Dr.Lube

Guest
Hi.

I have a problem running this command.. I have to zoom in to some coordinates extracted from an excel. everything works well if I do the command myself, but if it turns into the lisp it gets stuck saying
Code:
; error: autocad command refused: "_.zoom"


il lisp è:
Code:
 (setq xy_zoom
(conv_double (vlax-get-property cells 'item (+indice 3) 17)) 0.0)
(command "_.zoom" "_c" xy_zoom 2.5)
xy_zoom -> (8.309 1.002 0.0)


Thank you for your help!
 
the point is to make the original function recall in case this had been modified :) in any case it does not even go with "zoom"
 
provided that it also works with 2.5 (?!) all instructions passed to the command function (which are not variable) go in the form of string, as if you type at the prompt request.
 
in fact made a copy and paste on the command line, to me the command function went also with 2.5 as value and does not string. .
 
Unfortunately, it doesn't even go with that value as string. .

edit: I discovered the problem!!!on opendlc the button must be put in asynchronous! :

thanks for the help
 
ehh? what??
development interface graphic application autocad http://opendcl.com/wordpress/
this property controls whether event handlers are called synchronously or asynchronously. a synchronous call causes the dialog code to wait until the event handler returns before resuming; an asynchronous event call allows the dialog code to continue running, and the event handler is not executed until autocad is ready to process commands. this property is hidden and ignored for controls on modal forms.
event handlers that are called synchronously are limited in what they can safely do, because they run while the dialog code is in a suspended state and autocad is unable to process commands. for example, it is not possible to call the autolisp (command) function from a synchronous event handler.
asynchronous event handlers in most cases will not execute until after the event that triggered it has passed, however an asynchronous event handler can safely call the autolisp (command) function to process autocad commands. when a modeless dialog control's event handlers need to use the autolisp (command) function, the event invoke property for the control must be set to 1.
any events that have return values are always called synchronously (otherwise the return value would be lost). events called from modal forms are always called synchronously, since modal forms by their nature prevent autocad from executing commands while they are active. event handlers in these cases must conform to the requirements for synchronous events regardless of the event invoke property setting.
 
Sorry I didn't think about reversing the letters dcl with dlc and I imagined you were referring to who knows what.
cmq thanks to the info.
 

Forum statistics

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

Members online

No members online now.
Back
Top