circle pattern axis-z

Hi Everyone

I usually use Japanese, so please allow my mistakes in words.

So, this time is  first contact

Sample program( a part of all)

Private Sub Rorat (Nz, Nd)

    Dim Part As Object

    Dim boolstatus As Boolean

    Dim swSketchManager As Object

    Dim myFeature As Object

    Dim skSegment As Object

    Dim swModelDocExt As Object

    Dim swFeatureManager As Object

    Dim SelMgr As Object

   

    Set Part = swApp.ActiveDoc

    Set swSketchManager = swModel.SketchManager

   

'Select right Plane

    swModel.ActivateSelectedFeature

    swModel.ClearSelection2 True

    swSketchManager.InsertSketch True

   

    swModel.SketchManager.InsertSketch True

    boolstatus = Part.Extension.SelectByID2 ("Right Plane", "PLANE", 0, 0, 0, True, 0, Nothing, 0)

    Part.SketchManager.InsertSketch True

    Part.ClearSelection2 True

'Line depiction of rotation center

    Set skSegment = Part.SketchManager.CreateCenterLine (0.2, 0, 0, - 0.2, 0, 0)

    Part.ClearSelection2 True

    Part.SketchManager.InsertSketch True

   

'Selection of body for circular pattern, selection of axis

    boolstatus = Part.Extension.SelectByID 2 ("Knit Surface 1", "SOLIDBODY", 0, 0, 0, False, 256, Nothing, 0)

    boolstatus = Part.Extension.SelectByID 2 ("Line 1@Sketch 1", "EXTSKETCHSEGMENT", 0, 0, 0, True, 1, Nothing, 1)

   

'Circular pattern

    Set myFeature = Part.FeatureManager.FeatureCircularPattern5 (Nz, 2 * 3.14159265358979, True, "NULL", False, True, False, False, False, False, 1, 0, "NULL", False)

End Sub

SolidworksApi macros