Multiple entity selection in sketch

Multiple entity selection in sketch

Thomas.Long
Advocate Advocate
343 Views
0 Replies
Message 1 of 1

Multiple entity selection in sketch

Thomas.Long
Advocate
Advocate

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

 

 

0 Likes
344 Views
0 Replies
Replies (0)