0 Replies Latest reply on Jan 13, 2016 4:01 PM by Alexander Kibbe

    Offset and thicken help

    Alexander Kibbe

      I'm trying to make a macro and ultimately graphical interface that will allow a user to click on any surface of any part, run the code and get a new part that is a thicken offset of the previous.

       

      For now I'm just trying to get offset and thicken to work at all.  For now what i have is below and attached.  The stuff in comments are different ways I've tried to thicken.  The code works for making an offset surface.  just click any surface and run it and it makes an offset surface 10mm away from it but otherwise the same shape.  How do I then thicken this newly created surface?

       

      'precondition: click on surface to be offset

      Dim swApp As SldWorks.SldWorks

      Dim swModel As SldWorks.ModelDoc2

       

      Sub main()

       

          Set swApp = Application.SldWorks

       

          Set Part = swApp.ActiveDoc

       

          Part.InsertOffsetSurface 0.01, False

       

       

          '------------------------------------------------

          'Part.FeatureBossThicken 0.01, 1, 1

          '------------------------------------------------

          'Part.FeatureBossThicken2 0.01, 1, 1, False

          '------------------------------------------------

          'Part.FeatureCutThicken 0.01, 1, 1

          '------------------------------------------------

          'Part.FeatureCutThicken2 0.01, 1, 1, False

          '------------------------------------------------

          'Dim myFeature As Object

          'Set myFeature = Part.FeatureManager.FeatureBossThicken(0.01, 1, 0, False, False, True, True)

          '------------------------------------------------

          'Dim Feat As FeatureManager

          'Set Feat = Part.FeatureManager

          'Dim myFeature As Object

          'Set myFeature = Feat.FeatureBossThicken(0.01, 1, 0, False, False, True, True)

          '------------------------------------------------

      End Sub