AutoCAD 2015 now makes resizing model space viewports intuitive and easy.
If you use multiple model space viewports, you’ll love this feature.
A special note needs to be made that the frame of the model space viewports has 2 areas. The area where the plus sign + resides is meant for adding a new viewport. The other area consists of the rest of the viewport edge and has the symbol with 2 lines.
Resize a viewport by simply left-click and dragging the edge of the viewport within the “2 line” area.
The intersection of multiple viewports can be dragged to adjust the size all of the intersecting viewports.
To add a new model space viewport, you can left-click and drag the plus sign + near the top or right side of the viewport edges.
You can also left-click and drag anywhere along the viewport edge and hold the Ctrl key to make a new viewport.
If you would like te delete a viewport, you can simply drag a viewport edge until it collapses.
Have you ever opened someone else’s drawing and the AutoCAD cursor is at some odd angle?
The system variable to help control this setting is SNAPANG.
Below is an example of a cursor at an odd angle while in a layout tab
odd cursor angle
A quick glance at the system variable description doesn’t seem to be all that clear, but I know that if I enter SNAPANG in the commandline, it will make more sense.
Side note: There are a few “common courtesy” or “drawing etiquette” rules that I wish more people would follow when they exit a drawing. This topic is worthy of its own blog post and I will put one together in the future. But the idea is that before closing a drawing, make the drawing so that the file is optimized for the next guy.
This includes, setting the USC to World, Zoom to a view that isn’t confusing or change to a LAYOUT tab and zoom to the titleblock for the next guy, AUDIT the drawing to fix any errors. Check the SNAPANG and set it to zero…
Today’s featured routine was posted by “Peter” at Augi.com found here: http://forums.augi.com/showthread.php?22959-Help-Changing-text-style-in-blocks
This routine helps changes the text style of text objects and even attributes inside of blocks to a user specified text style. This is helpful for when you receive drawings from another source and would like to change text styles to match your text styles.
For this routine to work, the desired text style must exist in the drawing.
The format of how to run this routine is different than other routines that you might be used to. You load the lisp routine as normal, but there isn’t a command that you enter at the commandline. What you do is pass feed the LISP routine the “function” that runs the routine and then the 2 variables in order for it to run.
The format that you feed the command line is:
(changestyle “oldtextstylename” “newtextstylename”)
changestyle = starts the function (starts the routine)
oldtextstylename = replace this text with the name of the text style that you would like to be replaced. Note – keep the name in “quotes”
newtextstylename = replace this text with the name of the text style that you would like to replace the previous style. Note - keep the name in “quotes”
;;; Changes objects that are set to one text style to another text style. Both styles need to be defined in the drawing.
;;; Posted by Peter
;;; Use the foloowing format in the command line after loading the routine:
;;; (changestyle "oldtextstylename" "newtextstylename")
(defun ChangeStyle (strStyle1 strStyle2 / entItem objBlock objDocument objItem )
(setq objDocument (vla-get-activedocument (vlax-get-acad-object)))
(if (and (tblobjname "style" strStyle1)
(tblobjname "style" strStyle2)
(vlax-for objBlock (vla-get-blocks objDocument)
(if (> (vla-get-count objBlock) 0)
(setq objItem (vla-item objBlock 0)
entItem (vlax-vla-object->ename objItem)
(if (and (vlax-property-available-p (setq objItem (vlax-ename->vla-object entItem)) "StyleName")
(= (strcase (vla-get-stylename objItem)) (strcase strStyle1))
(vla-put-stylename objItem strStyle2)
(setq entItem (entnext entItem))
(princ "\nError check if styles exist: ")
(vla-regen objDocument 0)
There are 2 things in this blog post that I want to point out.
1) Share a LISP routine that rotates multiple objects around their individual base points…
2) The lisp routine shown in this post hasn’t been altered since 1991 and it still works in AutoCAD 2014. This may not seem like a big deal but with all of the various programming languages available to be used within AutoCAD, the power of using a LISP routine that hasn’t had to be changed or updated in over 20 years is pretty impressive.
Rotate Multiple Lisp routine with date shown
The Routine allows you to rotate multiple objects such as blocks and text objects that have an “Insertion Point” to a user-specified angle. And instead o0f rotating everything around one base point, the object’s individual base point is used.
In the example below, there is a vertical column of blocks that are rotated clockwise by 90s. I don’t know why, but all that I know is that I want them right-side-up.
- Load the routine
- ROTMULT <enter> to start
- Select objects
- <enter> when finished selecting
- “Enter Rotation Angle:” enter a positive number to rotate the objects counter-clockwise (example 90) and a negative number to rotate the objects clockwise (example -90)
;* Rotate Multiple
;* Rotates many entities around their respective basepoints
;* allows selection by AUTOCAD selection sets or SSX.
;* Written by David Husch, January 1991
(defun c:rotmult ()
(prompt "Select Entities to Rotate, <ENTER> for SSX.")
(setq ss (ssget))
(if (not ss) (setq ss (ssx)))
(setq num (sslength ss))
(setq x 0)
(if (setq ang (getreal "Enter Rotation Angle: "))
(setq ename (ssname ss x))
(setq elist (entget ename))
(setq pnt (cdr(assoc 10 elist)))
(command "Rotate" ename "" pnt ang)
(setq x (1+ x))