I have run into this situation before and haven't figured out the answer.
I start with a simple recorded macro that picks an edge of a cylidrical surface and extends it. The methods that do the work are SelectByID and InsertExtendSurface.
' ****************************************************************************** ' C:\DOCUME~1\kellnerp\LOCALS~1\Temp\swx1568\Macro1.swb - macro recorded on 02/12/05 by kellnerp ' ****************************************************************************** Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Sub main()Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc boolstatus = Part.Extension.SelectByID("", "EDGE", -0.0104893598479,
0.03815622208009, 0.1179905256888, False, 0, Nothing) Part.InsertExtendSurface 0, 0, 0.0811347End Sub
So now I want to pick edges from separate surfaces and have InsertExtendSurface operate on them one by one. The problem I have is how to get InsertExtendSurface to see each selected edge apart from the others because it doesn't operate on more than one surface body at a time.