[ACADE] [AutoLISP] Getting a list or selection set of all entities of a wire

[ACADE] [AutoLISP] Getting a list or selection set of all entities of a wire

Anonymous
Not applicable
704 Views
4 Replies
Message 1 of 5

[ACADE] [AutoLISP] Getting a list or selection set of all entities of a wire

Anonymous
Not applicable

Hi all. Anyone know about wires in AutoCAD Electrical?

Knowing a line object, how can I tell LISP about the WIRE it belongs to? How can I get all lines belonging to the same wire?

I looked around google and the forum, but couldn't find any info about wires in LISP.

Thanks.

0 Likes
705 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Can you filter through dxf code?

For example, this line selects all lines in layer "Layer1"

 

(setq select (ssget "_X" '((0 . "LINE")(8 . "Layer1"))))
0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks for replying. As far as I have seen the layers get created for each wire size and color. Meaning I get a layer for [RD #8 AWG] and another for [RD #10 AWG]; but then all wires with the same size/color combination get in the same layer.

 

These are the attributes for the line object. I think none of these refer to a specific wire.

((-1 . ) (0 . "LINE") (330 . ) (5 . "1964C") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "RD_2.5mm2 (14AWG)") (100 . "AcDbLine") (10 11.1354 11.2071 0.0) (11 13.9904 11.2071 0.0) (210 0.0 0.0 1.0))

0 Likes
Message 4 of 5

Anonymous
Not applicable

@Anonymous  Can you post an example of your .dwg?

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

I don't know anything about Electrical but I am sure there is Xdata attached to the lines.