Select a sketch (which could be 2d or 3d)

Select a sketch (which could be 2d or 3d)

DWhiteley
Advisor Advisor
395 Views
2 Replies
Message 1 of 3

Select a sketch (which could be 2d or 3d)

DWhiteley
Advisor
Advisor

Hi,

 

I would like to be able to select a sketch, which could be 2D or 3D.

Is there any way to do this?

 

This only works with 2D sketches, but I want to be able to select either 2D or 3D.

 

Dim skEnt As SketchEntity
Set skEnt = ThisApplication.CommandManager.Pick(kSketchCurveFilter, "Select sketch curve")

 

Thanks in advance,

 

Dave

envisage uk ltd

0 Likes
Accepted solutions (1)
396 Views
2 Replies
Replies (2)
Message 2 of 3

DWhiteley
Advisor
Advisor
Accepted solution
Ok got it if anyone is interested:

Set oSketch = oCmdMgr.Pick(kAllEntitiesFilter, "Select source sketch (ESC)") then filter out
0 Likes
Message 3 of 3

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

As I remember, CommandManager.Pick does not support multi-filters. You would need to use InteractionEvents and SelectEvents, in which you can call SelectEventsObject.AddSelectionFilter to add multi-filters.

 

if you prefer to CommandManager.Pick, the way you found would be the best.

0 Likes