[Error] Invalid Input Thread Length

Not applicable
07-15-2018
04:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I get an invalid input thread length error when i try to change a thread where the height of the face is less than ~5mm and the thread sizes are small too (M1-M10).
Thread is set to fullSize. Also fullSize false and thread length the same as height of the thread is throwing an error.
Is the problem within my code or is it a Fusion related error?
If I make the same thread in a higher body it is working!?
...
# get the design product = app.activeProduct design = adsk.fusion.Design.cast(product) # get the root component of the active design. rootComp = design.rootComponent for item in design.timeline.timelineGroups: item.isCollapsed = False # define all of the thread information. threadFeatures = design.allComponents.item(0).features.threadFeatures #rootComp.features.threadFeatures # get thread thread = threadFeatures.item(0) #threadFeatures.item(threadFeatures.count - 1 ) isInternal = thread.threadInfo.isInternal #ui.messageBox(str(thread.isFullLength))
# query the thread table to get the thread information threadDataQuery = threadFeatures.threadDataQuery defaultThreadType = threadDataQuery.defaultMetricThreadType recommendData = threadDataQuery.recommendThreadData(0.2, isInternal, defaultThreadType) # create the threadInfo according to the query result if recommendData[0] : threadInfo = threadFeatures.createThreadInfo(isInternal , defaultThreadType, recommendData[1], recommendData[2]) thread.timelineObject.rollTo(True) #thread.setThreadOffsetLength(adsk.core.ValueInput.createByReal(0), adsk.core.ValueInput.createByReal(0.24), adsk.fusion.ThreadLocations.HighEndThreadLocation) #thread.isFullLength = True thread.threadInfo = threadInfo design.timeline.moveToEnd()