Message 1 of 3

Not applicable
05-27-2021
03:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a project which contains a model. The model has 8 faces, and I want to create a thread on the 7th face.
Here's my code, but I keep getting the error.
design = app.activeProduct
rootComp = design.rootComponent
features = rootComp.features
components = design.allComponents
threadFeatures = features.threadFeatures
comp = components.item(0).bRepBodies.item(0)
componentFingerfaces = comp.faces
face = componentFingerfaces.item(7)
threadType = "ISO Metric profile"
threadDesignation = 'M6x1'
threadClass = '6g'
threadInfo = threadFeatures.createThreadInfo(False, threadType, threadDesignation, threadClass)
threadInput = threadFeatures.createInput(face, threadInfo)
threadInput.isFullLength = True
thread = threadFeatures.add(threadInput)
How do I solve this error? Maybe there is a way to change a thread of a complete component
Solved! Go to Solution.