Multiple entity selection in sketch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm going to have a single sketch consisting of multiple part boundaries. The idea is to be able to lay my parts out on the fly, then after all of my parts have been laid out then I can make each part.
My problem is this. Each part is going to have any number of internal boundaries for cuts in it. I need to be able to select multiple parts by click and drag over them, which I cannot seem to do with selectionfilterenum.
So what I want is
1) Select any number of lines and/or curves inside of a sketch
2) A new sketch is opened where the selection is dropped
3) Create components is run on the new sketch
Below is what I currently have.
I can create a new sketch (I have no idea how to close sketches though, as oSketch.Close or oSketch.Exit do not seem to work), but I need to figure out how to make multiple selections at once, drop it in the new sketch and run create component on it.
'Import Command Line Manager to access clipboard Imports System.Windows.Forms Sub Main() Dim Plate As SketchEntity Plate = ThisApplication.CommandManager.Pick (SelectionFilterEnum.kSketchCurveFilter,"Select outline of plate") oCompDef = ThisDoc.Document.ComponentDefinition 'set a reference to the active sketch. Dim oSketch As PlanarSketch Dim oWPlane As WorkPlane 'oWPlane = oCompDef.workPlanes.Item("XY Plane") 'oSketch = oCompDef.Sketches.Add(oWPlane) 'oSketch.Name = "New Sketch" 'oSketch.Edit 'set a reference to the transient geometry collection. 'Dim oTransGeom As TransientGeometry 'oTransGeom = ThisApplication.TransientGeometry ' End the transaction 'oTrans.End iLogicVb.UpdateWhenDone = True End Sub