Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Insertion du cube
- Part.SketchManager.InsertSketch (True)
- Part.SketchManager.AddToDB = False
- Part.SketchManager.InsertSketch True
- Part.ClearSelection2 True
- boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e.swSketchAddConstToRectEntity, swUserPreferenceOption_e.swDetailingNoOptionSpecified, False)
- boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e.swSketchAddConstLineDiagonalType, swUserPreferenceOption_e.swDetailingNoOptionSpecified, True)
- Dim vSkLines As Variant
- vSkLines = Part.SketchManager.CreateCornerRectangle(0, 0, 0, length, length, 0)
- Dim myFeature As Object
- Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False, False, 0, 0, 0.06, 0.01, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, True, True, True, 0, 0, False)
- 'Insertion d 'une sphère
- boolstatus = Part.Extension.SelectByID2("Plan de face", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
- Part.SketchManager.InsertSketch True
- Part.ClearSelection2 True
- Set skSegment = Part.SketchManager.CreateCenterLine(0#, 0#, 0#, -rayon * 2, 0#, 0#)
- Part.SetPickMode
- Part.ClearSelection2 True
- Set skSegment = Part.SketchManager.Create3PointArc(-rayon * 2, 0#, 0#, 0#, 0#, 0#, -0.007195, -rayon, 0#)
- boolstatus = Part.Extension.SelectByID2("Point4", "SKETCHPOINT", -6.1350289617321E-03, -2.21884825168814E-03, 0, False, 0, Nothing, 0)
- boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", -6.48958462346347E-03, -3.37946151612256E-04, 3.56782210049191E-02, True, 0, Nothing, 0)
- Part.SketchAddConstraints "sgATMIDDLE"
- Part.ClearSelection2 True
- boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
- Part.ClearSelection2 True
- boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", 0, 0, 0, False, 16, Nothing, 0)
- Set myFeature = Part.FeatureManager.FeatureRevolve2(True, True, False, False, False, False, 0, 0, 6.2831853071796, 0, False, False, 0.01, 0.01, 0, 0, 0, False, True, True)
- Part.SelectionManager.EnableContourSelection = False
- Part.ClearSelection2 True
- 'Répétition par esquisee
- boolstatus = Part.Extension.SelectByID2("Esquisse3D1", "SKETCH", 0, 0, 0, False, 64, Nothing, 0)
- boolstatus = Part.Extension.SelectByID2("Révolution1", "SOLIDBODY", -6.74308053442019E-03, 2.69252183593949E-03, 5.47894052022002E-03, True, 256, Nothing, 0)
- Part.FeatureManager.FeatureSketchDrivenPattern True, False
- boolstatus = Part.Extension.SelectByID2("Révolution1", "SOLIDBODY", 0, 0, 0, True, 0, Nothing, 0)
- boolstatus = Part.Extension.SelectByID2("Révolution1", "SOLIDBODY", 0, 0, 0, True, 0, Nothing, 0)
- 'Suppression de la première révolution
- boolstatus = Part.Extension.SelectByID2("Révolution1", "SOLIDBODY", -9.00371912371156E-03, 3.2719117743909E-03, 4.32472761337976E-03, True, 0, Nothing, 0)
- Set myFeature = Part.FeatureManager.InsertDeleteBody2(False)
- 'Cacher l'esquisse 3D1
- boolstatus = Part.Extension.SelectByID2("Esquisse3D1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
- Part.BlankSketch
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement