View Full Version : moving a drawing to (0,0)
Lions60
2006-07-27, 05:07 PM
I was just wondering if there was a way to automate the moving of a drawing to (0,0). The criteria is that the lower left hand corner of the drawing must be at (0,0). Can you automate the movement of this without manually picking the lower left hand corner of the drawing.
rkmcswain
2006-07-27, 06:59 PM
I was just wondering if there was a way to automate the moving of a drawing to (0,0). The criteria is that the lower left hand corner of the drawing must be at (0,0). Can you automate the movement of this without manually picking the lower left hand corner of the drawing.
Pretty basic.
Move
all
(unknown point)
0,0,0
Except, how are you going to determine the unknown point?
Is it the same in every drawing?
It is the LL point of a certain entity on a certain layer in every drawing?
Lions60
2006-07-27, 07:14 PM
All entities in the drawings are on the same layer, but my problem is figuring out how to automate the selection of the lower left hand corner though it might not even be a point on a line it could be where two points coverge out in space could be the lower left hand corner. Attached is an example of what i mean.
Adesu
2006-07-28, 02:28 AM
Hi Lions60,
I hope you don't post with excel program,it's rather difficult to copy clip to autocad,why not through in cad?,please resend in cad attach file.
All entities in the drawings are on the same layer, but my problem is figuring out how to automate the selection of the lower left hand corner though it might not even be a point on a line it could be where two points coverge out in space could be the lower left hand corner. Attached is an example of what i mean.
Couldn't the minimum extents (EXTMIN) variable be used? That would be as long as the extents are not already at 0,0.
I was just wondering if there was a way to automate the moving of a drawing to (0,0). The criteria is that the lower left hand corner of the drawing must be at (0,0). Can you automate the movement of this without manually picking the lower left hand corner of the drawing.
There probably is a better way to do this, but I wrote you a routine using the windows "cutclip" and "pasteclip" functions, which assigns the lower left corner of the entities as the insertion point whether there's geometry there or not.
I think it will work for what you want.
(defun c:origin ()
(setvar "ucsicon" 3)
(command "purge" "a" "" "n")
(command "tilemode" "1" "_cutclip" "all" "" "_pasteclip" "0,0,0")
(command "zoom" "e" "zoom" ".9x")
(command "purge" "a" "" "n")
(princ)
)
You should make sure the "insbase" insertion base point is set to 0,0,0. I tried to write that in but couldn't make it work.
Maybe one of the lisp gurus can tell me how to do it.
I tried adding a (setvar "insbase" 0,0,0) but it wouldn't work, any one??
Ted
(setvar "insbase" (list 0.0 0.0 0.0))
(setvar "insbase" (list 0.0 0.0 0.0))
Thanks Opie!
It works great, so here it is again setting the insbase to 0,0,0
(defun c:origin ()
(setvar "ucsicon" 3)
(setvar "insbase" (list 0.0 0.0 0.0))
(command "purge" "a" "" "n")
(command "tilemode" "1" "_cutclip" "all" "" "_pasteclip" "0,0,0")
(command "zoom" "e" "zoom" ".9x")
(command "purge" "a" "" "n")
(princ)
)
Have fun!
Ted
Lions60
2006-07-28, 06:36 PM
thanks very much
csiress
2006-08-23, 05:45 PM
Is it possible to move everything, even items on freezen or off layers, to 0,0?
Or am I asking too much?
Thanks
Craig II
<><
Is it possible to move everything, even items on freezen or off layers, to 0,0?
Or am I asking too much?
Thanks
Craig II
<><
To my knowledge, the easiest way would be to save the layer state, unlock, thaw, and turn on those layers, move everything, then restore the layer state.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.