Monday, July 30, 2007
CAD Tip of the Week: Plotting & Batch Plotting
PPV, PLT & PUB
Overview
There are a number of ways to plot drawings, but all first require proper set-up to work with our plotting process. To achieve maximum flexibility with minimum wastepaper, our plotting process requires that plot (.PLT) files first be generated, which may be done individually or as a batch process.
Beginning with AutoCAD 2006, the ‘Publish’ command was introduced that incorporates into the AutoCAD program environment the formerly external ‘Batch Plot Utility’.
After creating the plot files either individually or in batch, use the Kip Request program to send them to one of the plotters.
Plot Preview
To view how the current layout will look when plotted, type ‘PPV’ at the command-line. Alternatively, right-click on a layout tab, select ‘Plot...’ from the context menu and then click the 'Preview' button.
Plotting Sheet Setup
Type ‘plot’ at the command-line or right-click on a layout tab, and select ‘Plot...’ from the context menu. The resulting dialog box should look like this:
- If the dialog box shown on your screen has less information than what is shown above, then click the 'arrow button' at the lower right corner (next to the 'Help' button) to expand the hidden options.
- Now select the correct ‘Paper size’ from the drop-down list, which will usually be the same size as other drawings in the set.
- If this is a new drawing set, then refer to an architectural drawing to first determine the correct size.
- Select ‘Extents’ for plot area, and assure the ‘Center the plot’ checkbox is checked.
- Next select as the plotter ‘Batch.pc3’ and assure that the ‘Plot to file’ checkbox is checked.
- Then select in the ‘Plot style table (pen assignments)’ drop down the proper pen table for your job. The current standard pen table is 'Hargiselec.ctb', though you may need to select a different one depending on the client or specific task.
- Assure that the remaining options on the right hand side of the dialog box and in the ‘Plot scale’ area are the same as the example given above, and then
- Click the ‘Preview’ button to verify the set-up.
- Hit ‘Escape’ and make any adjustments if necessary.
- When all looks good in the preview, then either click ‘OK’ to plot, or ‘Apply to Layout’ and ‘Cancel’ to return to the drawing editor.
New Plotting Layout Setup from Existing Plotting Layout
If you have multiple drawings to set-up, consider saving the page set-up with a simple name, such as the sheet size, e.g. 11x17, 24x36, 30x42 etc. This in turn will be saved with the drawing file, and be accessible from other drawing files.
Thus when setting up plotting for the next layout, click the ‘Page Setup Name’ drop-down and select ‘Import’. Browse to the previously set-up file and import the required page set-up; the current layout will now be set-up exactly the same as the imported layout.
Plotting Single Drawings
Single drawings may be plotted, once they are set-up, by invoking the plot dialog box, and clicking ’OK’. You'll then need to browse to the plot file output directory, usually entitled ‘Plt’ ‘Plot’, ‘Plots’ or ‘Plot Files’, usually either one level down or one level up from the job CAD directory.
- A quick way to plot single drawings is to type ‘PLT’ at the command line.
- Provided the layout is set-up as described above, this macro will generate a plot file in the ‘Plt’ ‘Plot’, ‘Plots’ or ‘Plot Files’ directory, searching first one level down and then one level up from the current directory.
- If none of the above directory names are found, the plot file is generated in the current directory.
Beginning with AutoCAD 2006, the ‘Publish’ command was implemented. Type ‘Publish’ or ‘PUB’ at the command-line to open the dialogue box:
- By default, ‘DWF file’ is selected; generally you will want to change this to ‘Plotter named in page set-up’.
- Also by default, layouts in the current drawing are displayed.
- Be sure the ‘Model tab’ box is unchecked.
- Click the icon with the ‘+’ sign on it and browse to the correct job directory to add layouts from other drawings.
- Now sort the list by clicking the ‘Sheet Name’ column header:
- Now click the ‘Publish Options...’ button to define the output path for the plot files in the ‘Location’ field.
- Click first the ‘Location’ field, then the ‘…’ (ellipsis) button next to the field to browse to the desired output directory:
- When the output directory has been defined, click ‘OK’ to return to the ‘Publish’ dialog box.
- Now click the ‘Saved Sheet List…’ (diskette) icon to save the plot sheet set to a file, which will be given a ‘.dsd’ extension.
- Browse to the job CAD directory, and name the sheet set appropriately, e.g. ‘Electrical Drawing Set’.
- Now click the ‘Publish’ button to generate the plot files, or ‘Cancel’ to return to the drawing editor.
(PPV & PLT macro code to follow...)
Labels: CAD Tips
Monday, July 23, 2007
CAD Tip of the Week: The RESET Function
RESET FUNCTION
Are your leader arrows the wrong size, or tick-marks instead of arrowheads? Are blocks not prompting for attributes? Perhaps the units of measure are set to decimal feet? Do xref layers seem to forget the color to which they were set? These and many other sometimes unfathomable problems are quickly solved by the RESET function.
And if the scaling of leaders, blocks or text seems to be the issue, just be sure to first set the drawing scale using the ASCALE function before issuing the RESET. For example, say you're working on a quarter-scale drawing and note that the leader arrowheads are drawing at half size:
Command: ASCALE
Current ASCALE value is 96.0000
Enter new value: 48
Command: RESET
A partial listing of common issues solved by the RESET function is as follows:
- Block Attributes Not Prompting: Sets ATTPROMPT to 1
- Circles and Arcs Appear Jagged: Sets VIEWRES to 10000.
- Dimensioning and Leader Issues: (e.g. leader arrow size, leader arrowhead appearance) Sets DIMVARs to reasonable values based on current scale factor.
- Images Cannot Be Selected, Image Frames Are Invisible: Sets IMAGEFRAME to 2, view but noplot.
- Linetypes in Paper Space Appear Continuous: Sets PSLTSCALE to 0.
- Plotting Standard Pen Tables Unavailable: Checks the PSTYLEMODE system variable and issues the CONVERTPSTYLES command if the drawing is set to use named plot styles. You may see a dialog box requiring acknowledgment.
- Points (i.e. 'nodes') are Shown As Boxes or Crosses: Sets PDMODE to 0.
- Revision Cloud Bubble Size: First set proper scale factor using ASCALE function before issuing the RESET.
- Units of Measure Other Than Architectural: Sets linear units to architectural, angular units to decimal degrees, and positive angular direction to counterclockwise.
- Wipeout Frames Visible on Masking Blocks: Sets wipeout frames OFF.
- Xref Colors Not Remembered between Drawing Sessions: Sets VISRETAIN to 1.
(RESET macro code to follow...)
Labels: CAD Tips
Monday, July 16, 2007
CAD Tip of the Week: Attribute Macros
ATTRIBUTE MACROS
Attributes are variable text associated with blocks, containing for instance equipment or device tag strings. What is often inscrutable about attribute behavior is that each and every attribute is actually a separate entity (AutoCAD calls them 'subentities') from the linework comprising the rest of the block. Separate entities in that each and every attribute has its own layer, color, rotation angle, text style, text height etc. that are independent of the values assigned to the block's linework.
Access for editing attribute properties has never been easy. Many find it surprising that selecting a block and opening its properties dialog does NOT provide access to the attributes subentities.
The value of the attributes text string may be changed fairly simply now by double-clicking the block (it wasn't always so). However to change other attribute properties, you must type -ATTEDIT at the command line (don't forget the hyphen), then navigate a non-intuitive set of prompts that have remained essentially unchanged since the late 1980s to accomplish singular or global attribute property editing.
So the following macros are still useful for editing attribute properties. Many accept a selection set for input (as indicated by a 'Select objects:' prompt) and will automatically filter out any non-block entities before processing:
ATC - ATtribute Color Change attribute color
ATH - ATtribute Height Change attribute height
ATL - ATtribute Layer Change attribute layer
ATM - ATtribute Move Move attribute layer
ATS - ATtribute Style Change attribute text style
ATV - ATtribute zero-eleVate Zero attribute elevations
ATZ - ATtribute Zero-rotate Zero attribute rotations
TW - Text Width Change text & attribute width factor
Attribute Macro Code
Disclaimer: All code examples provided 'as-is'; no warranties or support options either expressed or implied!
(DEFUN C:ATM ( / E EN ENT A AN ANT LOOKING COUNT ICOUNT ITEMS )
; ATTRIBUTE MOVE
(COMMAND ".UNDO" "G")(SETQ E nil)
(SETQ LOOKING T)(SETQ COUNT 0)
(WHILE (NULL E)
(SETQ E (ENTSEL "\nSelect block: ")))
(SETQ EN (CAR E))
(SETQ ENT (ENTGET EN))
(IF (= (VAL 0 ENT) "INSERT")
(PROGN
(SETQ AN (ENTNEXT EN))
(SETQ ANT (ENTGET AN))
(WHILE LOOKING
(SETQ COUNT (+ COUNT 1))
(IF (/= (VAL 0 ANT) "ATTRIB")
(SETQ LOOKING nil))
(COND
((= (VAL 0 ANT) "ATTRIB") ; LOOK FOR ATTRIBUTES
(IF (= COUNT 1)
(PROGN
(PROMPT "\nMove attributes: ")
(COMMAND ".ATTEDIT" "" "" "" "" AN "P" PAUSE ""))
(PROGN
(PROMPT "\nNext attribute: ")
(COMMAND ".ATTEDIT" "" "" "" "" AN "P" PAUSE "")))
(SETQ AN (ENTNEXT AN))
(SETQ ANT (ENTGET AN)))
((= (VAL 0 ANT) "SEQEND")
(SETQ LOOKING nil)) ; END OF ATTRIBUTES -- STOP
(T (SETQ LOOKING nil))))) ; NO ATTRIBUTES
(PRINC "\nEntity is not a block..."))
(IF ANT (ENTUPD EN))(PRINC))
(DEFUN C:ATL ( / S1 D )
; STANDARDIZE ATTRIBUTES TO SPECIFIED LAYER
(COMMAND ".UNDO" "G")
(SETQ S1 nil) (GC) ; CLEAR SELECTION SET FOR USE.
(SETQ S1 (SSGET))
(IF (NULL LLY) (SETQ LLY (GETVAR "CLAYER")))
(SETQ D (STRCASE (GETSTRING (STRCAT "\nTarget layer <" LLY ">? "))))
(IF (/= 0 (STRLEN D)) (SETQ LLY D))
(ATL S1 LLY)(PRINC))
(DEFUN ATL ( S1 NLAY / D E EN ENT A AN ANT LOOKING COUNT ICOUNT ITEMS )
(SS-SIFT S1 0 "INSERT")
(SETQ ITEMS (SSLENGTH S1))
(SETQ ICOUNT 0)
(PROMPT (STRCAT "\n" (ITOA ITEMS) " block entities to process..."))
(PROMPT (STRCAT "\nProcessing block " (ITOA ICOUNT)))
(WHILE (<>? "))))
(IF (/= 0 (STRLEN D)) (SETQ LTS D))
(ATS S1 LTS)(PRINC))
(DEFUN ATS ( S1 NSTY / D E EN ENT A AN ANT LOOKING COUNT ICOUNT ITEMS )
(SS-SIFT S1 0 "INSERT")
(SETQ ITEMS (SSLENGTH S1))
(SETQ ICOUNT 0)
(PROMPT (STRCAT "\n" (ITOA ITEMS) " block entities to process..."))
(PROMPT (STRCAT "\nProcessing block " (ITOA ICOUNT)))
(WHILE (<>? ")))
(IF (/= nil D)(SETQ LTH D))
(ATH S1 LTH)(PRINC))
(DEFUN ATH ( S1 NHGT / D E EN ENT A AN ANT LOOKING COUNT ICOUNT ITEMS )
(SS-SIFT S1 0 "INSERT")
(SETQ ITEMS (SSLENGTH S1))
(SETQ ICOUNT 0)
(PROMPT (STRCAT "\n" (ITOA ITEMS) " block entities to process..."))
(PROMPT (STRCAT "\nProcessing block " (ITOA ICOUNT)))
(WHILE (<>? "))))
(IF (/= 0 (STRLEN D))
(SETQ LCR D))
(ATC S1 LCR)
(PRINC))
(DEFUN C:ATC ( / S1 D )
; STANDARDIZE ATTRIBUTES TO SPECIFIED COLOR
(COMMAND ".UNDO" "G")
(SETQ S1 nil) (GC) ; CLEAR SELECTION SET FOR USE.
(SETQ S1 (SSGET))
(IF (NULL LCR) (SETQ LCR (GETVAR "CECOLOR")))
(SETQ D (STRCASE (GETSTRING (STRCAT "\nNew color <" LCR ">? "))))
(IF (/= 0 (STRLEN D)) (SETQ LCR D))
(ATC S1 LCR)(PRINC))
(DEFUN ATC ( S1 NCOL / D E EN ENT A AN ANT LOOKING COUNT ICOUNT ITEMS )
(SS-SIFT S1 0 "INSERT")
(SETQ ITEMS (SSLENGTH S1))
(SETQ ICOUNT 0)
(PROMPT (STRCAT "\n" (ITOA ITEMS) " block entities to process..."))
(PROMPT (STRCAT "\nProcessing block " (ITOA ICOUNT)))
(WHILE (<> CNT 0)
(PROMPT (STRCAT "\rSifting entity " (ITOA CNT)))
(SETQ ELIST (ENTGET (SSNAME SS (SETQ CNT (1- CNT)))))
(COND
((/= (CDR (ASSOC CODE ELIST)) SCREEN)
(SSDEL (SSNAME SS CNT) SS))))
(PROMPT (STRCAT "\rSifting entity " (ITOA CNT) "...Done!"))
(PRINC))
(DEFUN SS-SIFT (SS CODE SCREEN)
(SETQ CNT (SSLENGTH SS))
(PROMPT (STRCAT "\nSifting entity " (ITOA CNT)))
(WHILE (> CNT 0)
(PROMPT (STRCAT "\rSifting entity " (ITOA CNT)))
(SETQ ELIST (ENTGET (SSNAME SS (SETQ CNT (1- CNT)))))
(COND
((/= (CDR (ASSOC CODE ELIST)) SCREEN)
(SSDEL (SSNAME SS CNT) SS))))
(PROMPT (STRCAT "\rSifting entity " (ITOA CNT) "...Done!"))
(PRINC))
Labels: CAD Tips
Monday, July 09, 2007
CAD Tip of the Week: eTransmit
ETRANSMIT
Use eTransmit to prepare both drawing packages going outside the office, and design milestone project archives.
For the related but separate purposes of sending drawings outside the office and creating design milestone archives, we have traditionally used a two-step process -- 1) 'binding' xrefs to the host drawings, and 2) zipping the host drawings into archive packages for transmittal or storage.
There are some drawbacks to the traditional approach:
- Copies of common xrefs are stored in each of the host drawings requiring them, resulting in unnecessary duplication and large file sizes.
- Each host drawing must be processed manually, one at a time.
- 'Zipping' is a separate process, potentially time-consuming and not without pitfalls, which must be done outside of AutoCAD.
- Drawings, once xrefs are bound, require additional work to remove bound entities if they are ever required as backups or 'rollbacks' for the current working drawings.
eTransmit does it all for as many drawings as desired in a one-step process, includes only one copy of commonly used reference files so is more efficient than binding drawing-by-drawing, and perhaps best of all 'relativizes' the xref paths in the host drawings so that xref's resolve no matter where they are unpacked, whether outside the office or years down the road when unarchived.
Select 'eTransmit' from the file menu to get started, click the 'Add File...' button to add as many drawings as desired to the archive or transmittal package. Click on the 'Transmittal Setups...' button to access the default settings dialogue:
The settings shown above generally work well; you may wish to click the 'Set default plotter to 'none'' and 'Include fonts' options for drawings transmitted outside the office. DO NOT check the 'Bind external references' box as this likely will increase the size of the archive manyfold, due to duplication of common backgrounds. If desired, transmittal settings may be named and saved for future reference.
Labels: CAD Tips
Monday, July 02, 2007
CAD Tip of the Week: Plot Here
PLOT HERE
Browse to any directory containing plot files using Windows Explorer, then right click on the directory and select 'Plot Here' from the context menu. This will start Kip Request using the selected directory as the initial location.
Note that this also works within AutoCAD file-related dialog boxes, such as File Open:
(code required to accomplish this to follow...)
Labels: CAD Tips







