Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using the below code to create an extrusion.
I am able to change the top name(yellow) of the parameter.
What I would like to do is change the sub-name(blue) and the 'Name'(green)
Lastly I would like to change the expression(red) to be the same as the value(in)
Because it is a TwoSidesExtent, I am at a loss as to how to do it.
# Create the head clearance
cutHeadSketch = sketches.add(xyPlane)
cutHeadCircle = cutHeadSketch.sketchCurves.sketchCircles.addByCenterRadius(center, numBoltCboreDiam/2)
cutHeadSketch.sketchDimensions.addDiameterDimension(cutHeadCircle, adsk.core.Point3D.create(-1, 1, 0))
cutHeadSketch.name = 'Head Clearance Sketch'
cutHeadProf = cutHeadSketch.profiles[0]
cutHeadExtInput = extrudes.createInput(cutHeadProf, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
distance1 = adsk.fusion.DistanceExtentDefinition.create(adsk.core.ValueInput.createByReal(numBoltClearanceLength - numBoltBodyLength))
distance2 = adsk.fusion.DistanceExtentDefinition.create(adsk.core.ValueInput.createByReal(numBoltTravelLength))
deg0 = adsk.core.ValueInput.createByString("0 deg")
cutHeadExtInput.setTwoSidesExtent(distance1, distance2, deg0, deg0)
cutHeadExt = extrudes.add(cutHeadExtInput)
cutHeadExt.name = 'Head Clearance Extrude'
Brad Bylls
Solved! Go to Solution.