- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can get counterbore hole depth and diameter to include the hole's diameter using:
hole_dia = adsk.fusion.Design.cast(self.app.activeProduct).features.holeFeatures.item(0).holeDiameter.expression
cb_depth = adsk.fusion.Design.cast(self.app.activeProduct).features.holeFeatures.item(0).counterboreDepth.expression
cs_dia = adsk.fusion.Design.cast(self.app.activeProduct).features.holeFeatures.item(0).countersinkDiameter.expression
I need to figure out how to consistently get the depth of the hole because that measurement is not readily available.
My issue isn't so much in getting the depth of the hole, I can see the values I need in a number of ways, the problem is mapping the value in a consistent way that lets me get the value the same way in my script to automate the identification of feature in a part designed in fusion. For example, I can get the depth of the hole in a series of timeline values returned in the order the parameter and its name were drawn:
param_name = adsk.fusion.Design.cast(self.app.activeProduct).allParameters.item(0).name
The problem is that the name parameter is not the name field available the way item(0).name is available for Hole1. Please see this picture:
the HoleDepth ParameterName is what Im after, I want to iterate through those names with a for loop at the same time I am iterating through the values I am identifying for the other dimensions so I can map the correct dimensions together.
any other way to get the length of the hole?
Solved! Go to Solution.