Thursday, October 11, 2012

Controlling What Table Is Selected For Catalog Lookup

Seen this before? My symbol is a push button so why doesn't Electrical automatically go to the push buttons? What actually drives what table is used?
image

The catalog database has many different tables. AutoCAD Electrical determines which table to use based on either the block name or the value contained in the WDBLKNAM attribute in the block. WDBLKNAM takes precedence over the block name. If no attribute named WDBLKNAM is present, AutoCAD Electrical defaults back to the block name. Either way, the following rules apply. For this test lets assume the block name is HPB12_Stan:

  1. The leading direction character is removed (H or V) and the database is searched for a table named PB12_Stan.
  2. If no table was found and the name is longer than seven characters, Electrical will begin removing characters from the right side until only seven characters remain. In this example, the tables PB12_Sta, and PB12_St would be searched for in descending order.
  3. If no table was found, Electrical searched for the family specific table. The family is based on the 2nd and 3rd digits in the block name.
  4. If no family specific table was found, Electrical checks the projects properties so see if this project allows searching the miscellaneous table. If so the MISC_CAT table is used.
  5. If all of these methods fail, the search ends and Electrical prompts the user to begin a new table for this new component type.
    • Here the user must choose between making a new table based on the family, (2nd and 3rd digits) or making a new table based on the block name.

image

Note: Be sure to include an H or V in the front of the value used in the WDBLKNAM since the same rules apply. Using LT1_Test will take you to the T1 (Terminals) table because in step 1 the first character is removed.

Sunday, October 7, 2012

INST & LOC Codes Honor Wildcards When Searching

imageThe Footprint_Lookup database, as well as the _Termprops, and _Pinlist tables all use wildcards. But did you know you can use wildcards when referencing the Installation and Location Codes? This is actually quite useful information and will give you a new level of control with reporting.

For example, I marked all components on the machine with a Location Code of MACHINE. I can easily create a BOM of all components used on the machine by putting MACHINE in the Location Code when running the report.

However how to I generate a report of all components that are NOT on the machine? Well one way would be to enter ALL the Location Codes used in the project separated by comas (excluding MACHINE of course). OR simply enter ~MACHINE.
image

The wildcard ~ as a prefix means "not MACHINE." So this will give the same report as the one listed above but is a much better method. Easier and much cleaner!

Now lets add to the scenario by adding several machines. I now have MACHINE1, MACHINE2, and MACHINE3 in my project. Using wildcards I can easily and quickly report all components used on all machines by using the code MACHINE#. The wildcard # will match any single numeric digit in its place.

 

 

So what all wildcards are there? Here's the list.
# (pound)  -  Matches any single numeric digit
@ (at)  -  Matches any single alphabetic character
. (period)  -  Matches any single non alphanumeric character
* (asterisk)  -  Matches any character sequence, including empty ones, and it can be used anywhere: beginning, middle, or end.
? (question mark)  -  Matches any single character.
~ (tilde)  -  If it is the first character in a pattern, it matches anything except the pattern.
[...]  -  Matches any one of the characters enclosed.
[~...]  -  Matches any one of the characters not enclosed.
- (hyphen)  -  Used inside brackets to specify a range for a single character.
, (comma)  -  Separates two patterns
` (reverse quote)  -  Escapes special characters

The last one, ` (reverse quote), would be necessary had I named the machines location MACHINE#1, MACHINE#2, and MACHINE#3. When reporting Electrical will see the # in MACHINE#1 and try to fill it with a number. So when sorting be sure to add the reverse quote like this... MACHINE`#1. Or for our example above, we wanted all machines the code would be MACHINE`##.

Putting a Twist on the Twisted Pair Symbol

This just in... "How to I push the height of the twist to the outside of the other wires?"

                image               image

This symbol is parametrically driven. When inserting it asks UP/DOWN or RIGHT/LEFT. After finding the next wire it then draws poly lines showing the twist. It's a little tricky. If you window select, you can see there is a little block between the broken wires. This block is HT0_TW or VT0_TW. It consists of only invisible attributes and no geometry.

Find these blocks in the default library, copy them to your custom library, and then modify the ACE_OFFSET attribute. A negative number will stay inside the original lines and a positive will push outside. Be sure to include the + or - in front of the offset distance you desire.

imageGreat question! I had a ball trying to figuring this one out.  

Friday, October 5, 2012

Displaying Catalog Numbers On The Symbol

imageYesterday a user asked me how to display catalog info on the symbols. Easy simply set the Invisible property on the CAT attribute to No. Then position and resize it as needed. However this user also wanted the Multiple Catalog entries to display as well. So if a contact block was added to this symbol it would display under the wire as an addition number.

Well the short answer is the attributes in question are named CAT01, CAT02, ect. Pictured below is my new exploded symbol with a now visible CAT and then I added CAT01, CAT02, and CAT03.
image

Now to place the block and add some catalog information.
image  image

And here is my new catalog info on the print...
image