Create an offset surface from multiple surfaces

Hi all,


I need to create an offset surface from multiple surfaces already add to the application.ActiveSelectSet.



        Private Sub Create_Offset_Surf()
            Dim _application As SolidEdgeFramework.Application = Nothing

            _application = SolidEdgeCommunity.SolidEdgeUtils.Connect()

            If _application.ActiveDocumentType = SolidEdgeFramework.DocumentTypeConstants.igPartDocument _
                And _application.ActiveSelectSet IsNot Nothing Then

                Dim objDoc As SolidEdgePart.PartDocument = DirectCast(_application.ActiveDocument, SolidEdgePart.PartDocument)
                Dim objOffset As SolidEdgePart.OffsetSurfaces = objDoc.Constructions.OffsetSurfaces
                Dim FaceArray() As Object = System.Array.CreateInstance(GetType(Object), _application.ActiveSelectSet.Count)

                For i = 0 To _faces.Count - 1
                    FaceArray(i) = _application.ActiveSelectSet(i)

                Dim myOffSurf As SolidEdgePart.OffsetSurface = Nothing

                myOffSurf = objOffset.Add(SolidEdgePart.FeaturePropertyConstants.igRight, 0.02, FaceArray)

            End If
        End Sub



Can't get it working, I think it must be a problem with the FaceArray.


Does anyone already manage to create an offset surface using multiple surfaces.



Thanks Romuald.


Romuald BERTIN