Im just starting to get into writing API, so ANY help would be appreciated :).
I am trying to create a macro that automatically generates different sizes/schedules of pipe. What statement can I use to create the sketch profile, Fully defined, and extrude to desired lenght.
Below is the code I currently have. It doesnt fully define the sketch, since the center of the pipe sketch isnt create on the origin of the part, plus it doesnt define the OD. The OD also doesnt come out correctly, it should be .405.
If ComboBox1 = ".125 (.405 OD)" Then Dim Radius As Double Dim Depth As Double Radius = 0.405 / 2 * 0.0254 Depth = 2 * 0.0254 swModel.CreateCircleByRadius2 0.05 * 0.0254 + Radius, 0.05 *
0.0254 + Radius, 0, Radius swModel.SketchOffset2 0.068 * 0.0254, 0, 1 swModel.ViewZoomtofit2 Set swFeatMgr = swModel.FeatureManager swFeatMgr.FeatureExtrusion True, False, True, 0, 0, Depth, 0, False, False, False, False, 0, 0, 0, 0, 0, 0, False, False, False swModel.ViewZoomtofit2 End If