Supressing, Unsupressing and Removing Features

Shows how to control suppressing, unsuppressing and removing features and sketches.  Can be used in combination with adding, locking and unlocking configurations.

# create a part
P = Part('Example Part')
# create a cube
CubeSketch = P.AddSketch('CubeProfile', P.GetPlane('XY-Plane'))
CubeSketch.AddRectangle(0, 0, 10, 10, False)
CubeFeature = P.AddExtrudeBoss('Cube', CubeSketch, 10, True)
# cut a hole in the cube
HoleSketch = P.AddSketch('HoleProfile', P.GetPlane('XY-Plane'))
HoleSketch.AddRectangle(2, 2, 8, 8, False)
HoleFeature = P.AddExtrudeCut('Hole', HoleSketch, 10, True)
# suppress the cube using the name of the feature
# unsuppress the cube using the feature object
# remove the hole using the name of the feature
# remove the hole sketch using the sketch object

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.