Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
en respuesta a: Anonymous

if you wish to create two pockets out of two curves, call it twice - once for each curve.  If you wish to create one pocket from two curves, there are different variations for the VARIANT that are also useful.

you passed it one string (which it thought was the one name of one curve) - the variant that works in that case is a string array. E.g.,

   Dim crvArray(2) As String
   crvArray(1) = "crv1"
   crvArray(2) = "crv4"
   Dim fmdc As FMDocument
   Set fmdc = Application.ActiveDocument
   fmdc.Features.AddPocket( crvArray, 1 )

 

you could also make a pocket from whatever curve(s) is/are selected by saying:

   fmdc.Features.AddPocket( fmdc.Selected , 1 )  ' get the selected set and pass it to AddPocket.   

if something nonsensical is selected, then addPocket should return Nothing, but you can select N curves and it will make a pocket out of them.