How to how to make Selection Set filter for Cogo Points (DXF Codes)?

How to how to make Selection Set filter for Cogo Points (DXF Codes)?

Anonymous
Not applicable
2,087 Views
5 Replies
Message 1 of 6

How to how to make Selection Set filter for Cogo Points (DXF Codes)?

Anonymous
Not applicable

I'm learning about programming for AutoCAD in VB.NET and still kinda new to things.

 

I was wondering how to develop a Selection Set Filter that will select only Cogo Points? I know I need to use Dxf.Start as the code, but then what's the string associated with Cogo Points? Can't find any documentation on this or any Civil 3D-unique entities...I know Line is just "Line" and "Arc" is just arc...but Polyline is the unintuitive "LWPolyline" and "Cogo Point" isn't working...

0 Likes
Accepted solutions (1)
2,088 Views
5 Replies
Replies (5)
Message 2 of 6

Jeff_M
Consultant
Consultant
Accepted solution

To determine the string needed for items, create one in a drawing, select it, then LIST it:

 

Command: li
LIST 1 found

AECC_COGO_POINT <<<<<<<<<<<This is the DXF Object Name

Layer: "C-SITE-SIDEWALK"
Space: Model space
Handle = 51eb9

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 6

Anonymous
Not applicable

BOOM! Knew there had to be some simple place to look. Thanks!

0 Likes
Message 4 of 6

peterfunkautodesk
Autodesk
Autodesk

Instead of doing it with a selection set filter, look a the PromptEntityOptions object and the "AddAllowedClass" method. This is a really easy to limit the objects that can be selected. You can add the "SetRejectMessage" as well to give feedback when entities of the wrong type are selected.

 

Here are the lines in C#

 

           

PromptEntityOptions peo = newPromptEntityOptions("Select a COGO Point");

peo.AddAllowedClass(typeof(Autodesk.Civil.DatabaseServices.CogoPoint), true);

 

Cheers,

 

Peter Funk

Autodesk, Inc.



Peter Funk
Autodesk, Inc.

0 Likes
Message 5 of 6

Anonymous
Not applicable

Peter, does that work if I am doing a selection by window polygon?

0 Likes
Message 6 of 6

Jeff_M
Consultant
Consultant

Yes, that works great for single entity picks, Peter. But for a selection set, still need to use the SSFilters.

Jeff_M, also a frequent Swamper
EESignature
0 Likes