AutoCAD’s “Group” concept for entity selection can be leveraged by Circuit Builder.
This was a cool idea. John Zwerlein, a long-time AutoCAD Electrical guru guy, asked me if Circuit Builder could somehow interact with existing entities on a drawing that carry specific AutoCAD “Group” name assignments. For example, when running Circuit Builder in its “Configure” circuit mode, could certain existing things be removed from the drawing is a given circuit option was selected? Hmm…
Tried it. Worked. Pretty cool.
Here’s a simple example.
Let’s say your drawing has a list of engineering notes in a column along the side of the drawing. Two of them are appropriate if the user selects a “full voltage” option, a different one is appropriate for the “with transformer” option, and none of the three are appropriate if the user selects a “None” option.
What we do is make sure each note carries a unique AutoCAD “GROUP” name. Let’s use names “NOTE1″, “NOTE2″, and “NOTE3″. You assign a group name to one or more entities by launching the AutoCAD “GROUP” command (type GROUP or _GROUP at the “Command:” prompt). Dialog pops up and you make it happen.
Now, your drawing engineering notes are set up with unique “group” names. Next step is to adjust the Circuit Builder spreadsheet “ace_circuit_builder.xls”. Open in Excel. If you have trouble finding this file, type this at the AutoCAD command prompt: (c:ace_find_file “ace_circuit_builder.xls” 3) [Enter]. Go to the appropriate sheet. Here’s the “horizontal insertion” sheet showing the control transformer entries:
What we want to do is carefully add in the stuff shown in red and yellow. For the red part, be very cautions. You need to enter the number zero but it needs to be interpreted by Excel as text, not as numeric. This means you should type in with a preceeding single quote, ‘0, instead of just the number zero. The value will appear left justfied in the cell. If it does not, fix it! This is important.
Here’s a close up.
In operation… when the “None” option is selected, the string “(Command “_ERASE” “_GROUP” “NOTE*” “”)” is sent by Circuit Builder to AutoCAD’s command processor. All entities with wild-card group name “NOTE*” are selected and erased. If the “Control transformer” option is selected, then entities with group names “NOTE1″ and “NOTE2″ are erased. For full voltage option, only “Note3″ is erased.