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: 

Script to import thousands of lines is very slow

Message 1 of 3
323 Views, 2 Replies

Script to import thousands of lines is very slow

Hello all,
I was hoping that you might be able to help me, I have been writing a script which inputs thousands of lines from X,Y coords in a text file generated in another program.
It seems that from observing the status bar during the execution of the script, the time in which it generates lines exponential slows down and by about 2500 lines, it really is going at a snails pace.
I have used the isComputeDeferred function on the sketch and this did make a massive difference however some of the larger files I am trying to implement (i.e. 30000+ lines) seem to be impossible to produce in a realistic time frame, not to mention how slow fusion is once these thousands of lines have been implemented.
Have you any suggestions as to how I could improve the performance of this?
I have attached an image to give you an idea of what I am producing and extruded it so that you can see the individual lines.
Any help would be greatly appreciated. Thanks in advance!
Labels (3)
Message 2 of 3
in reply to: m.s.peglar

Hi @m.s.peglar 


If having multiple sketches instead of one sketch is acceptable for you, you can icrease performance by distributing the lines between multiple sketches.

For example on my computer (using isComputeDeferred as you mentioned), creating a sketch with 2000 lines takes about 115 seconds while creating 20 sketches, each one with 100 lines takes about 13 seconds.

Message 3 of 3
in reply to: nnikbin

Seems like this is the best option. I also reduced the resolution on my external program which has helped massively and not lost too much quality.


Appreciate the help 🙂


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