Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Error] Invalid Input Thread Length

Message 1 of 2
274 Views, 1 Reply

[Error] Invalid Input Thread Length



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()
Message 2 of 2

One possible workaround:


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


adsk.core.ValueInput.createByString(threadExpression + " -0.0000000001"),

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report