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

centering objects on paper space

  • Thread starter Thread starter andrea.durzo
  • Start date Start date

andrea.durzo

Guest
Hello, everyone. I did a lot of searches on the internet and on the forum, but I didn't find what interests me.
I would like to know if there is a way to center an object to the sheet within the paper space.
I'll explain. if you want to draw my cartilage directly inside the paper space, at a certain distance from the side of the sheet and at a certain distance from the top edge, how can I do? the sheet has no snaps so I can't even make a simple rectangle perfectly centered in the sheet.

I don't know if I explained clearly.
Thank you anyway,

Andrea
 
Code:
;;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;;; center drawing (sheet and cartilage) in print layout.
;;; any slipping objects the sheet influence the centering.
;
;;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(defunc c:cefo (c:centrafoglio));shortcut
(defun c:centrafoglio ( / extmed limtmed )
(setvar "cmdecho" 0)
(vl-load-com)
(alert (strcat "centres the sheet in the print layout "
"\n"
"\n all design elements must"
"\n be inside the team!"
"\n"
"\n any stocking objects"
"\n influence the centering. "
)
)
(vl-cmdf)
(setq extmed (polar) (getvar "extmin")
(angle (getvar "extmin")(getvar "extmax")
(/ (distance (getvar "extmin")(getvar "extmax"))2))
)
(setq limtmed (polar) (getvar "limmin")
(angle (getvar "limmin")(getvar "limmax")
(/ (distance (getvar "limmin")(getvar "limmax"))2))
)
(vl-cmdf "_.move" (sget "_w" (getvar "extmin") (getvar "extmax") "" extmed limtmed )
(vl-cmdf)
(vl-cmdf "_.zoom" "0.95x")
(princ)
)
(princ "\n**********************************************
(princ)
first I suggest you turn off the snaps or insert the line
(Setvar "osmode" 0)
inside the lisp
 

Forum statistics

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

Members online

No members online now.
Back
Top