- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using Ivnentor 2019.3
I am in a part file.
There is a base extrusion object.
I have existing hole features placed through this object.
I would like to modify the depth of these hole features.
I'm trying to use the "SetDistanceExtent" method of the HoleFeature, to modify the depth of each hole in a collection.
This requires three parameters. The second being of the PartFeatureExtentDirectionEnum type, or I would just take the heavy-handed approach and do that, since my changes are temporary.
Every example I can find working with holes in a part is calling the PartFeatureExtentDirectionEnum directly, and not calling it from a stored value.
Example code:
For Each hf_Ftr In oc_Holes
'------hf_Ftr as HoleFeature object
'------oc_Holes as ObjectCollection [containing HoleFeature objects] Dim HFDepth as string = "0.375 in" hf_Ftr.SetDistanceExtent(HFDepth, HFDir, True) Next
What I cannot figure out is how to store the PartFeatureExtentDirectionEnum of hf_Ftr in order to later recall it.
Everything works fine if I replace "HFDir" with "PartFeatureExtentDirectionEnum.kNegativeExtentDirection" for example. I just don't know that I can rely on it always being Pos or Neg, and you can't make a HoleFeature symmetric, it would seem.
Solved! Go to Solution.