Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dim PartComponentDefinition = thisAppPartDocument.ComponentDefinition
Dim oSketch As PlanarSketch = PartComponentDefinition.Sketches.Add(PartComponentDefinition.WorkPlanes(2))
Dim pOrigin As SketchPoint = oSketch.AddByProjectingEntity(PartComponentDefinition.WorkPoints(1))
Dim oTransGeometry = App.TransientGeometry
oSketch.SketchCircles.AddByCenterRadius(pOrigin, 5)
Dim angle As Double = 90
Dim pElbowRevolveLine As SketchLine = oSketch.SketchLines.AddByTwoPoints(oTransGeometry.CreatePoint2d(-10, -20), oTransGeometry.CreatePoint2d(-10, 20))
Dim oNewWorkAxis As WorkAxis = PartComponentDefinition.WorkAxes.AddByTwoPoints(pElbowRevolveLine.StartSketchPoint, pElbowRevolveLine.EndSketchPoint, False)
Dim oProfile As Profile = oSketch.Profiles.AddForSolid()
Dim pElbowRevolve As RevolveFeature = PartComponentDefinition.Features.RevolveFeatures.AddByAngle(oProfile, oNewWorkAxis, angle, PartFeatureExtentDirectionEnum.kNegativeExtentDirection, PartFeatureOperationEnum.kJoinOperation)
This code is telling me the parameter is incorrect on the addbyangle method but I have no idea why or what is incorrect.
Solved! Go to Solution.