Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
ltmullen
1521 Views, 5 Replies

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

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...

5 REPLIES 5
Message 2 of 6
Jeff_M
in reply to: ltmullen

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
ltmullen
in reply to: Jeff_M

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

Message 4 of 6
peterfunkautodesk
in reply to: Jeff_M

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.

Message 5 of 6

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

Message 6 of 6
Jeff_M
in reply to: peterfunkautodesk

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report