Scaling dwg from 1:100 to 1:50
Does anybody know if there's an easy way to scale a drawing from 1:100 to 1:50 while the background xref stays the same scale?The basepoint of each blocks/text/... will have to be the same, so "scale" command will not work as it will just "shrink" the drawing.I know I'll probably have to shift a few things after the change.The problem I have is I have a about ten 1:100 drawings and need to do MANY detail layouts of different rooms in 1:50 scale on each drawing.Everything is already drawn in 1:100 scale and I need to make it 1:50 scale.
Another problem I see is that the blocks are in scale=2 while the text is in 200mm height, so not exactly straight forward.
So basically I need to scale the whole drawing down while keeping the basepoints of all the blocks/text/leaders/lines,etc the same.Please help. Can't you use viewports with different scale factors?
Would def. make life a lot easier. Haaa, I wish it was that simple.Our company standard has certain size of block/text/arrow size/etc.So if I just use the viewport, everything will be double in size.
I don't know if you created these drawings, or if you inherited them, but this is a perfect example of why you should Always draw at 1:1. :wink: Actually, this is a floor plan with electrical symbols.So can't really draw 1:1.If it was a detail of an equpiment, then yes always 1:1. Written quickly, just an idea really, may need more filters:
(defun c:sclAll (/ *error* BLKS DOC ENT I MA MI OBJ PTLST SCL SS UF) (vl-load-com) (defun *error* (msg) (and uF (vla-EndUndoMark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (setq blks (vla-get-Blocks (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))) (initget 7) (setq scl (getreal "\nSpecify Scale Factor: ")) (if (setq i -1 ss (ssget "_:L")) (progn (setq uF (not (vla-StartUndoMark doc))) (while (setq ent (ssname ss (setq i (1+ i)))) (setq obj (vlax-ename->vla-object ent)) (cond ((eq "INSERT" (cdr (assoc 0 (entget ent)))) (if (not (eq :vlax-true (vla-get-isXRef (vla-item blks (vla-get-Name obj))))) (vla-ScaleEntity obj (vla-get-InsertionPoint obj) scl))) ((wcmatch (cdr (assoc 0 (entget ent))) "*TEXT") (vla-ScaleEntity obj (vlax-get-property obj (if (eq "AcDbText" (vla-get-ObjectName obj)) (if (eq acAlignmentLeft (vla-get-Alignment obj)) 'InsertionPoint 'TextAlignmentPoint) 'InsertionPoint)) scl)) (t (vla-getBoundingBox obj 'Mi 'Ma) (setq ptLst (mapcar (function vlax-safearray->list) (list Mi Ma))) (vla-ScaleEntity obj (vlax-3D-point (polar (car ptLst) (apply (function angle) ptLst) (/ (apply (function distance) ptLst) 2.))) scl)))) (setq UF (vla-EndUndoMark doc))))(princ)) Wow Lee, thanks so much.That seems to do the trick for the most part.The only thing I notice is the arrows gets screw up.The leader lines changes somehow.Also, can the arrow head size be scaled by the same factor?You are the best! Might have to just add a filter for them in the COND statement, and do them another way.
(defun c:sclAll (/ *error* BLKS DOC ENT I MA MI OBJ PTLST SCL SS UF) (vl-load-com) (defun *error* (msg) (and uF (vla-EndUndoMark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (setq blks (vla-get-Blocks (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))) (initget 7) (setq scl (getreal "\nSpecify Scale Factor: ")) (if (setq i -1 ss (ssget "_:L")) (progn (setq uF (not (vla-StartUndoMark doc))) (while (setq ent (ssname ss (setq i (1+ i)))) (setq obj (vlax-ename->vla-object ent)) (cond ((eq "INSERT" (cdr (assoc 0 (entget ent)))) (if (not (eq :vlax-true (vla-get-isXRef (vla-item blks (vla-get-Name obj))))) (vla-ScaleEntity obj (vla-get-InsertionPoint obj) scl))) ((wcmatch (cdr (assoc 0 (entget ent))) "*LEADER")) ((wcmatch (cdr (assoc 0 (entget ent))) "*TEXT") (vla-ScaleEntity obj (vlax-get-property obj (if (eq "AcDbText" (vla-get-ObjectName obj)) (if (eq acAlignmentLeft (vla-get-Alignment obj)) 'InsertionPoint 'TextAlignmentPoint) 'InsertionPoint)) scl)) (t (vla-getBoundingBox obj 'Mi 'Ma) (setq ptLst (mapcar (function vlax-safearray->list) (list Mi Ma))) (vla-ScaleEntity obj (vlax-3D-point (polar (car ptLst) (apply (function angle) ptLst) (/ (apply (function distance) ptLst) 2.))) scl)))) (setq UF (vla-EndUndoMark doc))))(princ))
Annatotive?
页:
[1]
2