Management

Tips & Tools Weekly (Vol. 12, No. 39)

29 Oct, 2007


This Week's Software Tips

Xref Maintenance
Michael Cipolla wrote these two routines to help you work with xrefs. He explains, "The first routine, XRF.LSP, finds all the xrefs in a drawing and moves them to Layer 0. You can easily modify the code to move the xrefs to any layer you might want. At our company, we like all our xrefs to be inserted on Layer 0 to help with freezing layers contained inside an xref."

(defun C:XRF ()
(vl-load-com)
(vlax-for Lo (vla-get-Layouts (vla-get-ActiveDocument
(vlax-get-Acad-Object)))
(vlax-for Obj (vla-get-Block Lo)
(if
(and
(= (vla-get-ObjectName Obj) "AcDbBlockReference")
(vlax-property-available-p Obj 'Path)
)
(vla-put-Layer Obj "0")
)
)
)
(princ "\nXrefs moved to Layer 0")
(PRINC)
)

"The second routine, XRP.LSP, changes all xref paths to relative. This is beneficial if your drawings are moved around for any reason, such as for archiving. Xrefs that are absolute pathed can become unresolved when the files are moved to a different folder or drive. This little routine strips the path back to just the xref drawing name. Again, you can easily modify it for a particular xref-ing scheme."

(defun c:XRP ( / XrLstP XrName XrNamF)
(setvar "cmdecho" 0)
(command "_.undo" "_begin")
(setq XrLstP
(apply
'append
(mapcar
'(lambda (x / elist code)
(if (and (= (logand (setq code (cdr (assoc 70 (setq elist (entget
(tblobjname "block" x)))))) 4) 4)
(wcmatch (cdr (assoc 1 (entget (tblobjname "block" x)))) "*\\*")
)
(list (cdr (assoc 2 elist))
)
)
)
(ai_table "block" 0)
)
)
) ; end setq XrLstP
(if XrLstP
(progn
(princ "Removing Paths for Xrefs: ")
(foreach XrName XrLstP
(progn
(setq XrNamF (vl-filename-base (cdr (assoc 1 (entget (tblobjname
"block" XrName))))))
(command "_.-xref" "_path" XrName XrNamF)
(princ (strcat XrNamF " "))
)
) ; end foreach
) ; end progn
(princ "\nThere are NO Xrefs with Paths.")
)
(command "_.undo" "_end")
(setvar "cmdecho" 1)
(princ)
)

NOTES FROM CADALYST TIP PATROL: These two routines just show there's more than one way to skin a cat when you use fairly advanced programming techniques to carry out fairly easy processes. To the less experienced, there are easier ways to manipulate xrefs via AutoLISP, but the routines above show the power of Visual LISP and the more advanced aspects of AutoLISP.

I'm glad the tipster added that you can easily change this layer setting so that you can still maintain full control -- and in some instances, better control -- over your xref layers, no matter which layer you're working on.

Layer Merge
Buck Wilmerding
has trouble getting rid of extraneous, seemingly unused layers. He says that these unused layers "apparently have blocks that have been reassigned to other layers, unused text entries, and the like. Thankfully, I found this solution:

"Go to the drop-down menu and choose Format / Layer Tools / Layer Merge. Type N for [Name], then select the layer you want to remove. Then do the same for the layer you want to merge onto. I use 0, since I can't delete that one anyway.

"You can merge multiple layers at the same time, and the utility automatically removes the layer(s). This is very handy, and you won't lose any objects."

NOTES FROM CADALYST TIP PATROL: Excellent! Using a different approach, Delete Layer, sometimes results in a surprise or two. Layer Merge is so much easier and safer, plus you end up with an organized, clean drawing.

A whole host of useful features like this one are embedded in AutoCAD pull-down menus. With today's graphics-based user interfaces, it's so easy to rely on AutoCAD icons and not explore the menus. Take a few minutes to have a look around -- you may be surprised by what you find.

Note: These follow-up tips have not been tested by the Cadalyst Tip Patrol.

Follow-Up: Easy Insertion Scale
John Cole
wrote to us regarding the Tip Patrol's reminder to set the drawing base to 0,0,0 in response to Leonid's Nemirovsky's October 22 tip. John has had trouble seeing the base point in large surveys and site plans. He finds it especially true when the surveyor's drawing uses world coordinates.

John wrote this routine to locate the base point in a large survey or site plan. "It works graphically to show the base point, easier for us visually oriented people than looking up the coordinates. Once drawn, the circle locator helps to orient two or more surveys, and shows immediately whenever the surveys no longer align."

(Defun C:BASEINSERT ()
   (setq BASE (getvar "insbase"))
   (command "circle" base pause)
   (princ))

Follow-Up: Add Layers to Purged Drawings
Going one step further with Stacey Harter's October 22 suggestion about adding layers to purged drawings, Michael E. Beall added a button to his palette to include default Named Objects (those items found in the Rename command's dialog box). To the Command String field of that button, add:

^C^C-INSERT;"ATG_Master";0,0;1;;;

"Your master drawing won't contain physical entities, only what AutoCAD considers named objects, such as layers, text styles, and dimension styles," Michael explains. "Be sure to put the drawing name in quotes if it has a space in the name. You must enter the Insert command in Command line mode (by putting a hyphen in front of it) because the macro will come to a screeching halt if it runs into a dialog box.

"Now, any drawing I get from anyone on this planet can be instantly updated with my named objects with a single click."

Frank Roegiers also replied to Stacey's suggestion, adding, "This is exactly the way I do it, except I have one block for dimstyles, one for text styles, etc. These blocks are in my tool palette, so they're always at hand.

"For inserting or making layers current, I have a pull-down menu. I click on a layer name, and if it doesn't exist yet, it is created and made current. If it does exist, it is just made current."

Ken Buccellato wrote to say he believes the tool palettes offer an easier solution. "I've added several Line commands (the flyout creates any standard entity) on a locked network tool palette, such as Each Entity, Top of Curb, Road Centerline, or Median, just to name a few. These create the required entities and the correct layer. (Do we really need every layer and all the other stuff on the standard template?) On another palette, I have dimension and text styles, and once again each entity is created on the correct layer even if it doesn't exist. Layers, dimension styles, multileader styles, and text are automatically created only when needed.

"I have other tool palettes for our standard blocks, including title blocks, all inserted on the correct layer. Take a look at tool palettes -- they offer too much to ignore."

MicroStation Tip: Defining Projects with Desktop Shortcuts
Rick Sewell of MicroStation customer support offers, "I'm betting that your CAD shop is like most: You have multiple projects rolling right now. Maybe even dozens. You wish you had the luxury of having only one project to worry about. What's more, unless you have been very lucky, each project has its own set of standards.

"The standards for each project aren't different just to make life interesting. Clients have their own reasons for wanting the projects presented in a certain way. I can't change any of that. It's simply how things work in a typical MicroStation shop. What I do want to do here is pass on one little way you might be able to simplify your day-to-day work. I want to show you how to load the right project from your desktop shortcuts. If nothing else, it will guarantee you the right project is selected every time, so you minimize mistakes."

Axiom offers many MicroStation Tips on its MicroStationTips.com Web site.

Submit your tip, code, or shortcut 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, Ivanhoe Tejeda, and Billy Wooten.

Back to Top

 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Deals & Freebies

Virtual Earth-3DVIA

Dassault Systemes and Microsoft launched Microsoft Virtual Earth-3DVIA (technology preview). Developed by Dassault, the free online application allows individuals to create realistic 3D models, such as buildings and structures, and share them through Microsoft Virtual Earth and online communities.


Back to Top

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Opportunities & Honors

X-Factor Challenge Design Contest 2008
DSM Somos is looking for the best designs created with DMX-SL 100 stereolithography resin. A grand prize will be awarded for each of two categories: replacement of cast urethane or LS part and creative use of DMX-SL while highlighting its durability. Entries must be submitted by December 15, 2007. See the company's Web site for contest rules and prizes.

Imaginestics Wins 2007 Indiana Entrepreneurial Award
Imaginestics was honored with the 2007 Innovation Award by The Johnson Center for Entrepreneurship & Innovation, a division of Indiana University's Kelley School of Business. The award was presented October 18 at the Awards of Distinction ceremony in Indianapolis. Imaginestics is the developer of VizSeek, an online visual search engine based on 3D shape-matching technology, for marketing industrial products and services.

Back to Top

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Books & Training

Modeling and Rendering in Cinema 4D
Design Animation released Virtual Tutor for Architectural Rendering in Cinema 4D ($150), a DVD resource that walks users through preparing a building information model, lighting scenes, creating materials, and rendering. The DVD provides instruction on how a file is structured within Cinema 4D as well as how to apply materials to objects and manipulate and edit the materials.

NX5 Software for Designers Textbook
CADCIM Technologies released NX 5 for Designers ($55), a 592-page textbook written by Sham Tickoo of Purdue University. The textbook also is available in an electronic format ($29). The book features step-by-step examples that guide users through the learning process. Self-evaluation test and review questions are provided at the end of each chapter.

Back to Top

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Week's New CAD and Related Products

General Software: ShareCAD for AutoCAD
PHASE 2 document-sharing tool is designed to ensure that all externally referenced documents are uploaded and downloaded automatically. Read more

General Software: AutoProject
SYCODE software enables 3D-to-2D projection in AutoCAD. Read more

Visualization: Strata 3D CX
Six new plug-ins connect Photoshop CS3 Extended with Strata 3D CX v5.5, allowing designers to send 3D content directly into Photoshop. Read more

AEC: Task Navigator for Civil 3D
Add-on technology from Eagle Point provides on-screen instructions and links to commands to assist in the deployment of AutoCAD Civil 3D. Read more

MCAD: STEP Import for AutoCAD
SYCODE plug-in works with AutoCAD 2000 through 2008 and is available as a free 10-day trial download. Read more

MCAD: Scribe-iT DCC
GHOST 3D's digital content creation tool for Maya features a Polygon/Sub-D digitizing and modeling system. Read more

MCAD: HumanCAD v1
New digital human-modeling platform from NextGen allows users to perform ergonomic and human-factors analyses in product design. Read more

MCAD: SYCODE DWG and DXF Add-ons for Alibre Design
AutoCAD 3D interoperability tools enable users to read 3D solid geometry from DWG and DXF files. Read more

CAE: SINDA/G for ANSYS Workbench
ANSYS and Network Analysis release plug-in that integrates SINDA/G thermal analyzer into the ANSYS Workbench system. Read more

CAM: KeyCreator v6
Infotech Enterprises software allows surfaces and solid faces exported from various CAD programs to be converted to generic-type spline surfaces. Read more

PLM: Teamcenter for Medical Devices
Siemens and Tata Consultancy solution integrates compliance management with engineering and specification data. Read more

Back to Top

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Mark Your Calendar

Z-DAC 2007 American Conference
November 5-7, 2007
Hilton Head, South Carolina
The 2007 annual conference sponsored by Zuken will feature presentations on how to overcome the latest technology and manufacturing issues, along with product updates and best practice information. Read more

European CATIA Forum 2007
November 6-7, 2007
Paris, France
The European CATIA Forum, organized by Dassault Systemes, offers opportunities to meet key players of business transformation; share major market trends, business cases, and advanced strategies; and more. Read more

FABTECH International & AWS Welding Show 2007
November 11-14, 2007
Chicago, Illinois
The FABTECH International & AWS Welding Show is the largest event in North America dedicated to showcasing a full spectrum of metal forming, fabricating, stamping, tube and pipe, and welding equipment and technology. Read more

Z-DAC 2007 European Conference
November 27-29, 2007
Bonn, Germany
The 2007 annual conference sponsored by Zuken will feature user and third-party presentations that will address product development issues from both an electronic and electrical perspective. Read more

Advanced Manufacturing Expo
March 26-27, 2008
Toronto, Ontario, Canada
The two events that form the basis of this SME-sponsored expo -- Assembly Canada and the Canadian High Technology Show -- work together to help attendees learn about, compare, and implement solutions designed to help operations become leaner and more flexible. Read more

WESTEC 2008 Exposition & Conference
March 31- April 3, 2008
Los Angeles, California
Sponsored by the Society of Manufacturing Engineers, WESTEC offers free educational programs, including sessions on comparative technologies, lean principles, and business management strategies. Read more

MicroManufacturing Conference & Exhibits
Framingham, Massachusetts
April 22-23, 2008
Exploring the many processes available, this Society of Manufacturing Engineers conference brings together industry professionals to discuss the latest developments and to improve processes such as precision micromachining, micromolding, microassembly, and MEMS. Read more

NanoManufacturing Conference & Exhibits
Framingham, Massachusetts
April 22-23, 2008
Colocated with the MicroManufacturing Conference & Exhibits, this conference will highlight the current, near-term, and future applications of nanotechnology and how they are transforming the way we manufacture products. Read more

EASTEC 2008
West Springfield, Massachusetts
May 20-22, 2008
For nearly three decades, EASTEC has been an East Coast manufacturing tradition. Some 14,000 manufacturers, plant managers, and shop owners from throughout the region's diverse industries visit EASTEC to evaluate advanced technologies, production methods, and management concepts. Read more

For a complete list of CAD meetings, conferences, training sessions, and more, check out our calendar of events on Cadalyst.com.

Back to Top


AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter