Hey, recently i started converting my dynamo scripts into complete codes and here i’m facing an issue right now with the shortcurve tolerance error
Can you include the code line numbers next time you post a screenshot? It makes it way easier to point out where to do things.
Anyway I’m seeing some weird stuff around the line if line_length >= min_line_length
So you do a check to see if a line is too long or not, and if it’s long enough, you create a line
but in the statement below that (right after that if
) you again append a curve to it where you don’t do any line checks.
I’m guessing that’s going to be the main cause of the issue. I’m also guessing DB.Floor.Create does not just take a list of curves so you’ll have to create a List of DB.CurveLoop objects
in short do this:
Make sure this is at the top of your file
from System.Collections.Generic import List
from Autodesk.Revit import DB
And change the floor creation logic to this
curveloop_ob = DB.CurveLoop.Create(curveloop)
curveloops_list = List[DB.CurveLoop](curveloop_ob)
DB.Floor.Create(doc, curveloops_list, flid, lvid)