Solid Works Code
This is a collection of Solid Works API Code which I have deciphered. No warranty is expressed as to the quality of the code, nor the accuracy.
<h2> Sketches</h2>
Inserts a Circle
‘Point 1 is circle centre, Point 2 is on the radius
‘ Part.CreateCircle p1x, p1y, unknown, p2x, p2y, unknown
Part.Insert3DSketch
Part.ClearSelection2 True
Part.CreateCircle 0, 0, 0, 0.01, 0#, 0#
‘Part.ClearSelection2 True
Part.InsertSketch2 True
Extrudes a Circle
‘Extrudes a circle
boolstatus = Part.Extension.SelectByID(”Sketch2?, “SKETCH”, 0.3, 0.3, 0.3, False, 0, Nothing)
‘Part.FeatureManager.FeatureExtrusion True, False, True, 0, 0, extrusion length, 0, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 0,0,0
Part.FeatureManager.FeatureExtrusion True, False, True, 0, 0, 0.6, 0, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 1, 1, 1
Part.SelectionManager.EnableContourSelection = 0









Leave your response!
You must be logged in to post a comment.