Interesting!
Few things that I see that you might not be doing right from your screenshot are:
Symbol Name is not quite right, I see you named it VCB01
First Character = V = Correct for Vertical Symbols
Second, Third Character = CB = Correct for family code of Circuit Breakers
Fourth Character = 0 = This should be either 1 or 2, In you case it should be 1 for parent symbol
Fifth Character = 1 = This shouldn't exist for Circuit Breakers, The fifth Character is to denote NO NC Contacts for symbols like relays.
XxTERMxx attributes are quite right either. I see you used X4TERM01 attribute twice.
1. Symbol Builder will usually complain about duplicated attributes.
2. X4TERM01 is for left connections, so you current block has two left connections
3. You have defined it as VCB i.e. Vertical Circuit Breaker, The valid connection points for this would be TOP and BOTTOM wire connections i.e. TERM01 and X2TERM01 for Top Wire Connection, TERM02 and X8TERM02 for Bottom Wire Connection.
For Left Connections: TERMxx and X4TERMxx attribute
For Right Connections: TERMxx and X1TERMxx attribute
For Top Connections: TERMxx and X2TERMxx attribute
For Bottom Connections: TERMxx and X8TERMxx attribute
Replace xx with instance, like TERM01 and X4TERM01, TERM02 and X1TERM02
These attributes are very important to be correct for wire connections to work. The insertion point of these attributes is where the little green x markers would appear for wire connection when using the block.
Regarding programming, I think @rhesusminus has a very valid point about placing blocks inside a block. That might throw things off.
What is the workflow of your code? What does the code do after it has successfully placed all the attributes? Are you using a BLOCK command or WBLOCK or none and save everything as an independent .dwg
When we talk about the AutoCAD Electrical blocks at entity level, They are just geometry and attributes in a .dwg file, you don't use a block command to convert everything into a block. It is more like WBLOCK command where you extract all the geometry and attributes into an external .dwg file which when opened, appears in as an exploded block would.
| BLOCK | WBLOCK |
Purpose | Creates a block definition within the current drawing | Writes a block to a separate drawing file (DWG) |
Scope | Local to the drawing | Can be used in any drawing |
Storage | Stored in the current drawing file | Saved as an external DWG file |
Usage Context | Internal reuse within the same drawing | External reuse and sharing across multiple drawings |
In order for more effective troubleshooting, lets break things down. See the attached dwg file, I created that using ATTDEF commands for attributes and placed a regular rectangle. I didn't use any BLOCK or WBLOCK commands, Just simply a new drawing with nothing to purge, Add Rectangle, Add Attributes, and save as HCB1
When I insert this in AutoCAD Electrical drawing, It comes an any electrical symbol would. And what I mean by inserting is to Click on Icon Menu > Browse > Select the HCB1 dwg file.
Try the attached symbol, and try creating a similar symbol using ATTDEF without any coding to narrow down the problem. If the both of these work, then we can confidently say that your code is doing something different that doesn't or only partially works.
Try a little simpler version of your code, only pieces at a time.
1. Try a code that creates a rectangle and inserts the basic attributes like TAG1, MFG, CAT, DESC1, DESC2.
2. Add additional attributes for wire connections, Set of TERMxx and XxTERMxx for connections.
3. If still no success, please share your code or a sample block created by your code and I can look at it.
Happy Coding!
Regards,
Arshdeep Singh, C.Tech, CMSE®Electrical Designer & Programmer
LinkedInwww.blackcontrols.comPlease mark as "Accept Solution" if this resolved your issue. It might help someone else with the same question. Likes are welcome!