Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

[Error] Invalid Input Thread Length

Anonymous

[Error] Invalid Input Thread Length

Anonymous
Not applicable

err.PNG

 

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()
0 Likes
Reply
426 Views
1 Reply
Reply (1)

Anonymous
Not applicable

One possible workaround:

 

- subtract a small Value of the length of the thread length

 

thread.setThreadOffsetLength(adsk.core.ValueInput.createByString(thread.threadOffset.expression),
adsk.core.ValueInput.createByString(threadExpression + " -0.0000000001"),
adsk.fusion.ThreadLocations.HighEndThreadLocation)

Seems like it is a Fusion 360 Issue with computing precision. @moderator Maybe create a support ticket?

0 Likes