Sunday, June 30, 2013

Surfing a Project Using Wild Cards – Fix_Me 2

imageLast week while discussing the ‘fix_me’ LISP with Jeff D. from Harris Corporation, Jeff suggested skipping the script all together and instead filling in the fix_me’s block TAG1 default prefix with fix_me-. Then later surfing the project for any symbols with a TAG starting with ‘fix_me’. This is a great idea.

Create a new symbol called fix_me and add it to the icon menu. Make sure to add fix_me- to the TAG1 attribute as the default prefix. Now it can be inserted like a normal symbol. The tag will take on fix_me- as a prefix and whatever the proper reference number should be. ex. fix_me-101

Now to surf project wide for any symbols starting with fix_me….

Start the Surfer from the Project tab.
image 
The command is asking you to select something for the Surfer to tract. Instead press Enter.
image

imageimage
From this dialog you can use many wild cards to search the entire project for components, catalog numbers, wire numbers, and item numbers.

Add fix_me* to the Component tag field and press OK. Project wide all components who’s TAG starts with fix_me are shown. From here I can surf to each one.

This gives a list of all components in one list. Something the ‘fix_me’ script does not. However users will need to remember to run this from time to time. Where as the ‘fix_me’ script runs every time the drawings is opened.

Just another option. I thought it was a cool idea. Thanks Jeff.

Running a LISP, or Command, on File Open - (Fix_Me)

You can set a LISP utility to run each time you open a drawing from the Project Manager. This is set in the wd.env file. Look for the line that starts with *WD_OPEN_DWG.
         <<Link to my post about the wd.env file>>

“How do I mark a symbol/wire that has a problem, or missing information, and later quickly find it?” Last week this question came up again.

Below is some code that you can find inside of Electrical’s help as sample LISP code. Simply copy and paste it into a text file and save the file as Fix_Me.lsp. APPLOAD this file.

(defun c:fix_me ( / ss en ed xy)
  ; Look for any block insert on the drawing with a block name of "FIX_ME"
  (setq ss (ssget "_X" '((-4 . "<AND")(0 . "INSERT")(2 . "FIX_ME")(-4 . "AND>"))))
  (if (/= ss nil)
    (progn ; one or more found. Zoom up on the first one found
      (setq en (ssname ss 0)) ; entity name of first or only block
      (setq ss nil) ; release the selection set
      (setq ed (entget en))
      (setq xy (cdr (assoc 10 ed))) ; block insertion point
      (command "_.ZOOM" "_CENTER" xy 1.0)
      (princ "\nThis needs attention!!!\n")
  ) )   
  (princ)
)

Typing ‘fix_me’ will now run the script which zooms in on the first block named fix_me that the script finds. So create a block named fix_me and give it attributes for notes as well as all symbol attributes. This fix_me symbol can then be used when a needed symbol is missing and the engineer is waiting on the CAD Admin to create it. Once the new symbol is finished the fix_me symbol can be swapped (Swap/Update Block) with the new one. Values in the attributes will carry across to the new symbol. It could also be placed off to the side of a symbol with missing catalog info, or anything else the engineer is unsure of at the time of placement.

So once the LISP file and block are created, why not run them each time a drawing is opened? This takes us back to the WD_OPEN_DWG line in the wd.env file. If your block and LISP files are both named fix_me replace the default *WD_OPEN_DWG line with this…
WD_OPEN_DWG,(if(not c:fix_me)(if(setq x(findfile "fix_me.lsp"))(load x)))(if c:fix_me (c:fix_me))

Pretty slick right.

Friday, June 28, 2013

Modifying Attributes In Existing Blocks – AutoCAD Electrical

Anyone modifying existing block attributes has run into the mysteries of how to update the existing blocks on the drawing. Reinserting the block doesn't update the attributes. I should be using Swap/Update block. However when testing I tend to keep the changes inside the test drawing using embedded blocks. Doing this means the existing occurrences of this updated block must have their attributes synchronized.
image

The only problem I have with this method of updating existing blocks is having all attributes return to the blocks default layer. Today I learned when using the Swap/Update block all attributes are placed back on the proper Electrical layer. This is a great little discovery. Now I can continue editing the block within the drawing until I’m happy with it, then WBLOCK it back out to the library. Following that up with an Swap/Update puts existing blocks back in order.

   image image

Monday, June 10, 2013

Creating a Table of Contents or Drawing List Report – AutoCAD Electrical

AutoCAD Electrical has a built in Drawing List Report that can report any of the drawing properties within the active project.
image

Sunday, June 2, 2013

Adding the Missing Manufactures to AutoCAD Electrical’s Catalog Database

image

This question keeps coming up. It’s on the Autodesk Discussion Groups, its a call I have answered several times on IMAGINiT’s support desk, and it was just posted on our own discussion group… Productivity Now Discussion Forum - Electrical Product Catalog Post

The default install of AutoCAD Electrical only includes a few manufactures. If pressing the catalog Lookup button only shows a few manufactures, my guess is the others aren't installed.

Go to the “uninstall a program” dialog from Windows Control Panel. Select AutoCAD Electrical and the press Uninstall/Change.
 image  image

Shown below are the dialogs for both Electrical 2013 and 2014. Press Add or Remove Features.
image    image

Select all desired manufactures and then press Next through the next few dialogs. Be prepared to insert the media or point the installer to the downloaded (and extracted) files.
image
    image