FLATSHOT In Action

We recently were given some 3D models by a subcontractor that needed to be incorporated into our drawings. There was one model in particular that was rather large in file size considering that it was only a small part of our overall design for the project. And to top it off, the 3D model from the subcontractor was to be placed about 11 times throughout the overall model. Even when the large file was brought into the drawing as an XREF, many of the AutoCAD designers experienced loading times of about 10 minutes.

The file size of the large model is almost 50 megabytes even after trying many methods to reduce its size. The method that we found that worked wonders was to use a FLATSHOT representation of the 3D model as a substitute for the 3D model.

Here’s how:

Below is a view of the piece of equipment that is 50 megabytes.

3D view of 50 megabyte file

3D view of 50 megabyte file

Below is a top view of the large file. This view is all that a majority of the designers needed to see in their drawings

Flatshot 2 Top View

The FLATSHOT command can be used at the command line or the tool can be found on the ribbon under the “3D Modeling” workspace under the “Home” tab > “Section” panel (dropdown) > “FLATSHOT

Note: that the view that is currently being shown on-screen will be used to produce the FLATSHOT version of the model. Think of this command as you orient your view of a 3D model and then take a picture with a camera. That picture is now the flattened 2d representation of the 3D model.
Keeping that in mind, if needed we could go to the side elevation views of the 3D model and produce FLATSHOT versions of those views so that they could be incorporated into someone’s drawing as well – thus reducing the time of opening the larger file.

Flatshot 3 Flatshot on ribbon

 

For this instance, I used the following settings to produce the FLATSHOT.

I suggest playing with the various settings to meet the needs of your particular project.

Flatshot  settings1

Once the FLATSHOT file is created it is a good idea to open the file and try to clean it up further. Some commands that might help are: OVERKILL, PURGE, JOIN, AUDIT

Below is a file size comparison of the large 3D model, the FLATSHOT version and the cleaned up FLATSHOT

Flatshot 4  File shize comparison

Now that we have a 2D version of the 3D model, the designers simply unload or detach the larger model from the XREF Manager in AutoCAD and load the FLATSHOT version.

Note: it is important to assign a person to take resposibility of keeping the 3D model and the FLATSHOT version in synch. If the 3D model was to be altered or moved in some way, the FLATSHOT would need to be updated so that everyone is using the most current data. In our instance at work, the large 3D model was not going to change through the project so it was an easy 1-time solution.

 

Flatshot 5 XREF manager unloaded

Posted in Manage, Modifying, TIPS, XREFs | 3 Comments

AutoCAD 2015 Resize Model Space Viewports

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.

Viewport frame picture 2

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.

Viewport Frame 1To 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.

Viewport Frame 2

 

Viewport Frame picture 1

Posted in AutoCAD 2015, New in 2015 | Leave a comment

AutoLISP: Dynamic Text Align

With AutoCAD 2015′s new TEXTALIGN tool, comes the question of “what about those of us that don’t have AutoCAD 2015″?

Luckily, Lee Mac has a LISP version that accomplishes many of the same functions and even adds a few others.
http://www.lee-mac.com/dynamictextalignment.html

~enjoy

Lee Mac’s Dynamic Text Align

Posted in AutoLISP: Modify, AutoLISP: Text, Modifying, Text | Leave a comment

AutoCAD 2015: Text Align Dynamically

A new feature in AutoCAD 2015 is the Text Align tool found on the “Annotate” tab > “Text” Panel and the button that has 2 stacked letter A’s. The command to start this command is TEXTALIGN <enter> and the command alias is TA <enter>TextAlign1

 

This command works on both MTEXT and DTEXT (single line text) and makes the process of aligning text easy.

(side note: I refer to single line text as “DTEXT” because that is how AutoCAD refers to that type of text.

  • The alias to quickly add DTEXT is simply DT <enter>.
  • The alias to quickly add MTEXT is T <enter>…)

By default, this command uses a text object’s insertion point based on how it it is justified. Below is a selection set of both MTEXT and DTEXT showing the grips of their insertion points.

TextAlign3

You are then prompted to Select a Text object.
The text object that you select will define the first point of alignment by its insertion point

after you select the text, the alignment can be at any angle. The picture below shows the text being aligned without ORTHO turned OFF and the angle of the cursor is at some random angle…

TextAlign4

The picture below shows how the text will look when ORTHO is turned ON and the cursor is pulled up (or down will work as well).

TextAlign5 ortho

 

Below is the result of the aligned text.

TextAlign6 Result

TextAlign Select text

As a good AutoCAD user I hope that you noticed that during the command, there are options. All of the options are helpful but one of them stands out. This is the “Distribute” option.

Distribute Option: This option aligns the text and evenly spaces (distributes) them between 2 points.

The steps shown below are:

  • TA <enter> to start the TEXTALIGN command
  • Select the text objects to be aligned <enter>
  • P <enter> to start the “Points” sub-option
  • Pick the first point (upper line)
  • O <enter> to start the “Options” sub-menu
  • D <enter> to select “Distribute”
  • Pick Second point (lower line)

TextAlign Distribute

 

Make sure to check out this AutoCAD help link for more helpful info about the features of this command: http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-CC1BE498-4908-434E-8FDA-0DE87E05EA15

Posted in AutoCAD 2015, Modifying, New in 2015, Text | Tagged | 3 Comments

AutoCAD Cursor/Crosshair Angle

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

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.

SNAPANG 2

SNAPANG 3

 

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…

 

 

 

Posted in BASICS, TIPS | 1 Comment

AutoLISP: Change Text Styles

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”

Text Style Change

 


;;; 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
;;; http://forums.augi.com/showthread.php?22959-Help-Changing-text-style-in-blocks
;;;
;;; Use the foloowing format in the command line after loading the routine:
;;; (changestyle "oldtextstylename" "newtextstylename")
;;; 
(defun ChangeStyle (strStyle1 strStyle2 / entItem objBlock objDocument objItem )
 (vl-load-com)
 (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)
    (progn
     (setq objItem (vla-item objBlock 0)
           entItem (vlax-vla-object->ename objItem)
     )
     (while entItem
      (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)
)

Text Style Merge 1

 

Text Style Merge 2

Posted in AutoLISP, AutoLISP: Attributes, AutoLISP: Manage, AutoLISP: Text | 2 Comments

AutoLISP: Rotate Multiple Objects Around Their Base Point

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

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.

Rotate Multiple

Here’s how:

  • 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)

~Enjoy



;* 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 ss 
  	(if (setq ang (getreal "Enter Rotation Angle: "))
	  	(repeat num
		  	(setq ename (ssname ss x))
		    (setq elist (entget ename))
			(setq pnt (cdr(assoc 10 elist)))
			(command "Rotate" ename "" pnt ang)
 		    (setq x (1+ x))
	    	)
	  	)
    )
  )

Posted in AutoLISP, AutoLISP: Blocks, AutoLISP: Modify, AutoLISP: Text | 2 Comments