LISP routine performs save at wrong time

LISP routine performs save at wrong time

brettehman4012
Explorer Explorer
965 Views
5 Replies
Message 1 of 6

LISP routine performs save at wrong time

brettehman4012
Explorer
Explorer

Hello All,

This is my first post & I am relatively new to creating LISP routines. I am attempting to create a routine that will ZOOM EXTENTS, MOVE a specific block by its insertion point to a destination of the users choice, QSAVE and finally CLOSE (close at the end is not necessarily a requirement). The problem that I am confronted with is that the routine is trying to QSAVE prior to the selection of the MOVE destination point. I have been wrestling with command and parenthesis locations to no avail. If someone could take a look and show me the error in my ways I would surely appreciate it. Thanks in advance.

0 Likes
Accepted solutions (2)
966 Views
5 Replies
Replies (5)
Message 2 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

Try this:

....

    (command "_.MOVE" h "" bip pause); for User specification of destination point

....

Kent Cooper, AIA
0 Likes
Message 3 of 6

brettehman4012
Explorer
Explorer

Hi Kent,

I read your input on the forum quite often and it is very informative, thank you. I gave it a shot but it didn't work. I can always finish the MOVE command, it just doesn't QSAVE at the correct time. Here is the whole conversation I have with AuotCAD - 

 

Command: AM
zoom
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: extents Regenerating model.

Command: _.MOVE
Select objects: 1 found

Select objects:
Specify base point or [Displacement] <Displacement>:
Specify second point or <use first point as displacement>: qsave
Invalid point.
; error: Function cancelled

Specify second point or <use first point as displacement>:

 

How do I get it to QSAVE after I select the destination point. I thought to use PAUSE even tho MOVE inherently contains a pause for the destination point. Thanks so much for the reply.

0 Likes
Message 4 of 6

Moshe-A
Mentor
Mentor

@brettehman4012 ,

 

 I thought to use PAUSE even tho MOVE inherently contains a pause for the destination point.

 

The move command is controlled by the (command) function so you have to put a pause argument in order it pauses for the destination point. if you do that, you will see that your command works. by the way why do you need this zoom extents and the beginning?

 

Moshe

 

 

0 Likes
Message 5 of 6

brettehman4012
Explorer
Explorer

Hey Moshe,

Thanks for the reply. It worked this time. My Apologies to Kent1Cooper, i probably typed something incorrectly, its been a long week. The ZOOM EXTENTS at the beginning is because the procedure that the dwg goes thru prior to it opening with the NorthArrow in the wrong location (occasionally) does not ZOOM EXTENTS prior to closing and we need to see everything for the re location. Thank you all again for the help.

0 Likes
Message 6 of 6

Moshe-A
Mentor
Mentor
Accepted solution

@brettehman4012  hi,

 

so please close this thread and mark @Kent1Cooper's answer as your so solution.

 

thank you

moshe

 

0 Likes