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: 

Parameter I/O Add-in Question

Message 1 of 4
280 Views, 3 Replies

Parameter I/O Add-in Question

I am using the Parameter I/O add-in with great success.  This is an excellent add-in!  This add-in has enabled me to create a model with 500 dimensions driven by a single User Parameter.  My question: is there anyway to speed the import process?  Import takes about 25 minutes for a model with 500  dimensions.   Seems like the model is being updated for each parameter imported - is there a way to hold off on Compute until all parameters have been imported?


Thanks for any guidance.


Joe Camisa



Message 2 of 4
in reply to: joecamisa

Hi @joecamisa .


I haven't used the Parameter I/O Add-in, but if you can modify it, changing the timeline.markerPosition Property might help. 



I drew a circle on the sketch to create a diameter constraint and ran the following script

# Fusion360API Python script
import adsk.core, adsk.fusion, traceback
import time

def run(context):
    ui = None
        global _app, _ui
        app = adsk.core.Application.get()
        ui = app.userInterface
        des  :adsk.fusion.Design = app.activeProduct

        prm = des.allParameters.itemByName('d1')

        # As it is
        sw = stopwatch()
        print(f'As it is:{sw.lap()}')

        # Move MarkerPosition
        tl = des.timeline
        markerPos = tl.markerPosition
        tl.markerPosition = markerPos
        print(f'Move MarkerPosition:{sw.lap()}')

        if ui:

def test(prm, count = 500):
    for v in range(count):
        prm.value = v

class stopwatch():
    def __init__(self):
        self.t = 0
    def start(self):
        self.t = time.time()
    def lap(self) -> str:
        return '{:.3f}'.format(time.time() - self.t)


Here are the results.

As it is:45.503
Move MarkerPosition:29.732


I have a feeling that more complex data would have a bigger effect.

Message 3 of 4
in reply to: joecamisa

I think you can do what @kandennti suggests without changing any code.  Just move the timeline marker to the beginning of the timeline before you run the Parameter I/O command, run the command, and then move the marker back to where it was.

Brian Ekins
Inventor and Fusion 360 API Expert
Message 4 of 4
in reply to: joecamisa

Hello @kandennti and @BrianEkins 


Your suggestions have worked!   I found that I needed to move the timeline marker back to just AFTER the sketch with the dimensions to be exported, made proportional in a spreadsheet and reimported as User Parameter based (fx) dimensions.  The import took less than one minute vs 20 minutes without moving the timeline marker.


This is a great help for my work process and is GREATLY APPREACIATED. 


Thank you both.


I hope soon I will learn enough to contribute guidance as you both have.

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