
Opis
Enables the user to Import/Update parameters from or export them to a CSV (Comma Separated Values) file. When importing/updating parameters from a CSV file the data in it needs to be in a specific format: <parameter name>, <unit>, <value>, <comment>
The easiest way to make sure your CSV file follows the correct format might be to first export the parameters into a file and then have a look at its content - the import will require the data in the same format.
When importing parameters from a file, if a parameter with the given name already exists, then its unit, value and comment will be updated, otherwise a new user parameter will be created with the provided values.
When exporting parameters to a file, all available parameters will be exported, not just the user parameters.
I'm new here, but this might help. I exported my parameters from a project that I had assigned a few "Favorite" parameters to. That meant that they were at the top of the CSV file when it exported. I then imported them into another project and got parsing errors. The "Favorite" parameters were referencing other parameters down lower on the list. I used a text editor to reorder the CSV file and the import went great.
This app helped me a great deal.
It axported all parameters, not just the user parameters, and imported them as user parameters, but did so without a hitch, and it was easy to delete the extra parameters.
I wanted to clean up an old parametric design bottom up. Using this I could copy all the parameters to a new file easily
Hi Adam,
Thanks for the great plugin - However, I seem to have found a bug. When the Expression field of a Parameter contains a formula/equation like "BaseLength - ( CameraRampFrontOffset + cameraRampRearOffset )" the Python script chokes and stops importing - but in Notepad it looks like the exported CSV is valid and correct. Also, I can open an exported CSV with several of theses complex Expressions and their contents appear in the correct spreadsheet columns.
I'm surprised that AutoDesk hasn't picked up on this great idea, it would be a great for AutoDesk to fully support parameters in a library with named groups of params. Maybe also implementing an include verb or a series of includes in a parent parameter list. Like C, Java, etc.
Thanks to you, though, we have this great tool in the meantime.
Thanks again!
Please submit your request on the Fusion 360 IdeaStation: https://forums.autodesk.com/t5/fusion-360-ideastation/idb-p/125 Could the issue be one the these: https://modthemachine.typepad.com/my_weblog/2016/12/parameter-io-issues.html
Initial thoughts - THANK YOU!
Now - why don't I see the NAMES I gave the parameters?
Maybe I did something wrong (clicked on the wrong side of "NO" (=Export) and then clicked on the wrong side of "YES" (=Import).
That in and of itself is odd - can't rename the buttons to "Import" and "Export" instead of "Yes" and "No"?
It's an excellant start but seems as if it might be an 80% fullfilment.
But Thank you.
Glad you like it! :) These samples were the very first ones to kick off the App Store and their main purpose was to show the capabilities of the API. It's open source, and you're welcome to modify it as you wish :)
I tried to import parameters I just exported from another file, but it kept throwing exceptions. I found the issue, you cannot have an expression reference a parameter.
Example of when error is thrown:
"dimension_1","in","1.5 in",""
"dimension_2","in","dimension_1",""
However, if the parameter is operated on while achieving the same result, it imports without errors:
"dimension_1","in","1.5 in",""
"dimension_2","in","dimension_1+dimension_1-dimension_1",""
Tested those exact parameters and it seems to work for me: http://www.youtube.com/watch?v=lKpALd_Ys7E
Im tring to export an airfoil (2D) into a csv to compare with xfoil. I am getting errors and it is not a parametric design. How can I fix this?
Just what I needed!!
Thnx,
Willem
Thank u so much!
This is exactly what i needed!
Many many thanks! Essential working with more versions of the same project and you want to synchronise parameters in all.
Thank you for providing the functionality you really need. I tried to load a .csv file today. The following error appears. I want you to know how to solve it.
Addin Stop Failed: Traceback (most recent call last ) : "C:/user/henry/appdata/roaming/autodesk/applicationPlugins/ParameterIO.bundle/Contents/ParameterIO.py", line 226, in readTheParameters
commentOfParam = row[3]
IndexError : list index out of range
---------
Thank you i fixed!
Have to fill in comment low. I didn't fill in before, so i had error.
Thanks, Daniel. This saved me some time!
without this the parameters capability in F360 is pretty meaningless. great to be able to share parameters between sketches. helps maintain uniform naming. i have a general purpose csv for each design that i use with shopbot. fantastic!
The parameters capability might seem meaningless without this, but once you consider the parameters as global variables, you can see how useful the capability is. For example, I'm working on a model featuring four holes bored in a surface in a rectangular pattern, and each hole has a diameter, x position, and y position. There are four sketches that feature these holes by themselves, so that makes 4 sketches * 4 holes * 3 dimensions, so if you had to change all of the bores, you'd have to make 48 separate modifications. Using parameters to size and position the bores, you only have to modify the three parameters (and you won't inadvertently miss one).
errors are thrown when importing
Are you trying to share parameters between different files? If so, these errors are likely because some of your model's automatically generated Model Parameter names will be the same as some of the Model Parameter names you are uploading, causing your model to change those values to the uploaded ones. Try opening up the CSV file in Notepad and deleting everything except for the User Parameters.
@Ian Syndergaard No I use it to only adjust parameters in current model. The add in doesn't export or import the data correctly. It clumps it all in one row in the csv. file.in excel. It looks correct in notepad except there are extra commas being added for some reason.
This is a great add in for what I want to use Fusion for. Is it possible to include the 'Value' Parameter in the CSV file, or replace the 'Expression' Parameter with the 'Value' Parameter?
I'm glad you like this sample add-in. I don’t think it will be updated in the near future to include this functionality. :( However, the source code is available with the add-in and you are welcome to modify it as you wish.
this is an amazing tool of you want to have weird measurements like i do, and experiment with them. My only question: would it be possible to rearrange the list of parameters (now the added parameters are just chronologically, and if you add one later, that one cannot be put in the row and that becomes inconvenient when copy pasting the values in the cvs file... ) or is that a question for the Change Paramters plugin...
Is it possible to auto-update project without opening it?
Could you be a bit more specific on what exactly you'd need? You mean updating parameter values from a CSV file automatically?
Yes, Without clicking 'Import CSV' inside I/O Parameters Script. Something that will work like linked to CSV file and updating model parameters real time when I will change its.
Was this ever resolved? Or an explanation given on how it could be done?
Without manually running a command? >> yes. Without opening the Fusion 360 project? >> no. In case of the former you would need to create a program that keeps checking the csv file or registers for a system event about file updates on the system (depending on which OS and programming language you use it can be done differently) and when that happens you read it again and update the parameters in the Fusion model
This is a wonderful plugin that will really help me out because sometimes I am dealing with close to 200 user parameters. But it would not accept an expression that uses other parameters to calculate a value. This is huge for me since a lot of my parameters are used this way. If it is not too difficult to add that in it would be great!
This functionality is (or can be) implemented, but it is within Fusion 360 itself. The parameters will just update accordingly. There are great tutorials on YouTube, but in a very simple way; you could have dimensions accept other dimensions as values and use math expressions on those. The result would be automatically shown in the parameters window as a dimension value. EX: Say d1 =10 and d2 =30, then d3 = d1+d2 which will show 40 as the value. Alternatively, use Excel to crunch the numbers and import the results.
An excelent plug in, running very reliably. The only requirement is that the .csv file you input has the variables in the correct format, which is very easy to make sure, since you can just make the variables in Fusion, export and then start tweaking. Super easy, and EXTREMELLY helpful. Big "Thank You!!!" to the creator. P.S. OCD moment here. The only issue I have is that I'd like the icon to go away fromt the main toolbar (next to the redo), since I have it in the modify toolbar anyway.
The latest release 1.2.0 solves that and does not place an icon in the Quick Access Toolbar (QAT)
Throws a runtime error InternalValidationError: pComplexUnit when I try to export my parameters.
The latest release 1.2.0 solves that.
I find when I use Undo/Redo it affects the parameters as well. This plugin allows me to quickly save and load parameters.