This Week's Software Tips
Place Text Along an Object
Jim Dee tells Tips & Tools Weekly readers about a tool he created for placing text along an object in AutoCAD drawings. For any object that can be divided or measured -- polylines, splines, circles, arcs, lines, etc. -- you can place a specified string of text along it. He says, "The routine is completely open source and is packaged in a setup file for easy installation. It is written in LISP and VBA for the user interface, and it's a good example for using LISP and VBA together. Several options in the dialog box let you control the placement and direction of text, and all settings are saved in an INI file." Go to www.caddee.com/programs and click on the TEXT_CURVE.EXE file to download.
Sharing Sheet Sets
In response to a question posted on the Cadalyst Discussion Forums about sharing sheet sets, Leonid Nemirovsky sent this tip: "Only one person can open from the sheet set drawing with multiple layouts included in the sheet set. Open one layout and all layouts in the sheet set that belong to that drawing will be locked. Others can open the layouts as read only. Clicking on other layouts in the sheet set will simply switch between layouts in the already open drawing."
NOTES FROM CADALYST TIP PATROL: Maybe a future release of AutoCAD will address this issue and allow layouts of opened sheet sets to be modified by concurrent users -- similar to xrefs.
Automated Engineering Stamp
Len also sent in this routine to add engineering stamps to drawings. He wrote, "Usually professional engineer stamps with signatures are included in the final drawing set, and very often when an electronic copy is delivered to client, the stamps are removed. My suggestion is to attach them as an xref using this very simple LISP routine. It is set up to start in C:\, but it can be modified to start in any folder where stamps are located.
(defun trap1 (errmsg) (setvar "insunits" iu) (setq *error* temperr)
(alert(strcat "Variable INSUNITS restored to " (rtos iu 2 0)))
(DEFUN C:PESTMP ()
(SETQ TEMPERR *ERROR*)
(SETQ *ERROR* TRAP1)
(setq iu (getvar "insunits"))
(if (= iu 2)(setvar "insunits" 1))
(setq folder "C:\\");;;;;;;;;;;Here is the place to change location
folder (setq stmp (getfiled "Select Engineering Stamp" folder "dwg" 8))
(command "xref" "a" stmp pause "" "" "") (setvar "insunits" iu) (setq
NOTES FROM CADALYST TIP PATROL: Good thinking! Keep in mind that insertion locations can vary a lot (requiring user input), so an AutoLISP routine might not work for everyone. For some users, the Stamp command along with AutoCAD's Digital Signature feature might be exactly what you need. Also be sure to check the client's standards. Some may require drawings to be real-time signed (not a photocopied signature image).
AEC Object Clean-Up
Demetrios Xarhoulakos sent some advice for ridding your AutoCAD drawings of AEC objects -- those intelligent walls, doors, windows, and other objects created in a vertical solution such as AutoCAD Architecture. "In this day and age of so many vertical AutoCAD products, I'm constantly receiving drawings from consultants that contain AEC objects. These objects cause me many problems when brought into vanilla AutoCAD. Files function much more slowly, and I get more fatal errors than ever before.
"I recently discovered the command ExportToAutocad. This will essentially Wblock your entire drawing into a new AutoCAD file and remove all AEC objects. It will also flatten 3D objects such as wall styles created in AutoCAD Architecture. This has been a lifesaver for me. The command can be a little complicated, though. When you enter it at the Command line, you have a series of options:
Export options [Format / Bind / Bind Type / Maintain / Prefix / Suffix / ?] <Enter for filename:
"Some of these are useful, but typically I just want to remove the AEC objects without binding or changing file formats. In addition, the command is very tedious to type into the Command line. So I wrote a LISP routine for this command:
(defun C:exp ()
(setvar "cmdecho" 0)
(command "-exporttoautocad" "B" "N" "S" "-FIXED" "" "")
(setvar "cmdecho" 1)
"This will execute the command and create a new file in the same folder with the same file name and a '-fixed' suffix added to it. I simply overwrite the original file with this new one and all AEC objects are removed."
NOTES FROM CADALYST TIP PATROL: Be careful with this procedure. It dumps a lot of valuable information that another drafter included in the drawings for a purpose. Consider upgrading to the appropriate vertical release to maintain this extra information or at least have the original creator of the drawings send you a version sans the AEC objects.
Mishaeli Isak sent this AutoLISP routine that builds a chart and lists the ASCII codes of the current style font. This table shows the characters (or symbols) that this font supports but that do not have an assigned key on the keyboard. To get such a symbol, simply type %%ASCII code (the number of the symbol in the chart) in your text line. For example, to get the ¼ symbol with TXT.SHX, type %%188; for µ, type %%181.
NOTES FROM CADALYST TIP PATROL: Good tip! Add to that the Windows Character Map (accessed through the Mtext Editor), and users will have a vast array of characters at their disposal. In the Mtext Editor, right-click then select Symbols / Other to access this feature.
Note: These follow-up tips have not been tested by the Cadalyst Tip Patrol.
Follow-Up: Isolate and Unisolate Layers
Michael Kling wrote to us in response to the layers tip in the March 17 edition, in which the Tip Patrol refers to the Layerp (Layer Previous) command as a replacement or substitute command for Layuniso. Michael stated, "While this also does the trick to restore the visibility of objects to before the Layiso command, it does not retain any changes that were made to the layer settings performed after the Layiso command. That is, any changes to layer colors, linetypes, lineweights, etc., that are made after Layiso will be lost when the Layerp command is used."
Ron Adams followed up on the same tip, saying, "In addition to the excellent information already shared for Isolate and Unisolate layers, I have altered the ACAD.PGP file to automate the following commands as well, and am quite happy with the results.
MicroStation Tip: Study Model Rendering for the Masses
John V. Finkell wanted to create simple study model renderings (sometimes referred to as chipboard or chalk renderings) within MicroStation. He was looking for an approach that would require little user intervention for lighting and material setups yet could consistently produce nice-quality renderings for a majority of models. His goal was to develop an approach that could easily be done before full details of materials and lighting are known. These models also would to serve as the basis for producing construction drawings/contract document sets.
Today's MicroStation tip courtesy of Axiom and MicroStationTips.com.
Submit Your Tip for your favorite CAD software. If we publish your tip, we'll send you a Cadalyst T-shirt, and each month Cadalyst editors will randomly select one published tip and send a $100 gift card to its author. Please submit only code and other tips that are your original work (or provide the original source so we can include proper credit) and tell us which software version you use. By submitting code, you grant Cadalyst the right to print and distribute your code in print, digitally, and by other means. Cadalyst and individual authors retain all rights to the code; published code is not to be used for commercial purposes.
Tips & Tools Weekly software tips for AutoCAD are reviewed by Cadalyst staff and the Tip Patrol before publication. Use all tips at your own discretion, please, and watch later editions of this newsletter for updates and corrections. We're sorry, but editors and Tip Patrol members cannot provide assistance with technical problems; please refer to Cadalyst's Hot Tip Harry-Help discussion forum.Sincere thanks to our volunteer Tip Patrol members: Brian Benton, Don Boyer,
Mitchell Hirschklau, R.K. McSwain, Kevin Sawyer, and Billy Wooten.
Back to Top