Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 11 of 13 (117 Views)

Re: Script for moving the drawing in multiple drawings.

05-13-2013 11:58 PM in reply to: Kent1Cooper

Kent1Cooper wrote:
That will only do the current space, whether Model space or the current layout/tab in Paper space.  So if you might have both kinds, and you want this to happen in all spaces, you would need to step through and do it in each one -- that can also be automated.

Only thing is, you may need to add another routine to re-position the contents of a "viewport" if the entities on Model space and the viewport itself does move.

 

Or the user can do it manually that is.

 

Contributor
rudrasree
Posts: 21
Registered: ‎06-06-2011
Message 12 of 13 (104 Views)

Re: Script for moving the drawing in multiple drawings.

05-20-2013 12:07 PM in reply to: Kent1Cooper

Kent1Cooper wrote:

Kent1Cooper wrote:
....Use the EXTMIN System Variable....

 

(command "_.move" "_all" "" (getvar 'extmin) "0,0")

....


In addition, it would probably be a good idea to make sure Object Snap can't throw off the results, either by setting OSMODE to 0 first or by just applying None Osnap to the Move displacement points:

 

(command "_.move" "_all" "" "_none" (getvar 'extmin) "_none" "0,0")


Thanks for the post

Can you  u please guide me why you have put _none.

I could understand move; all by getting extmin to 0,0 but what does this "none" mean.

I am only an end user so not familier with much detail...

once again thanks for the post.

*Expert Elite*
Kent1Cooper
Posts: 5,233
Registered: ‎09-13-2004
Message 13 of 13 (101 Views)

Re: Script for moving the drawing in multiple drawings.

05-20-2013 12:44 PM in reply to: rudrasree

rudrasree wrote:
....

Thanks for the post

Can you  u please guide me why you have put _none.

I could understand move; all by getting extmin to 0,0 but what does this "none" mean.

....


It's an object-snap mode, just like ENDpoint or MIDpoint or INTersection.  It ensures that if you have running object-snap modes turned on, the Move command will not "find" some nearby location that you do not want it to use, such as an Endpoint or an Intersection, for either the start or end of the displacement.  If the routine were made to turn object snap off entirely, those could be omitted.  But when you do it that way, it's better to save the OSMODE System Variable value first, then set it to 0, and finally, reset it to the saved value at the end.  In a routine such as this that only uses a couple of points to which object snap could possibly be applied, it takes far less code to just leave OSMODE as it is, and turn object snap off for each location.

Kent Cooper

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community