Formulas in Parameters
TailboneJake opened this issue · 11 comments
Dear mr. Tapnair,
I was so thrilled when someone on the F360 forum pointed me toward your add-in.
After I updated my designs to get FusionSheeter working - it did not work out for me.
The issues I had were:
FusionSheeter stores parameters which are calculated from other params as their values.
That way one loses the relativity of those params.
For instance:
As a luthier I use a parameter called "Scalelength", "StringSpacing" and "NumberOfStrings".
From those parameters a lot of other params are calculated - for instance "Stringspacing / (NumberOfStrings - 1) gives the string-spacing between strings.
Wat FusionSheeter now does (at least in my testing) is:
it calculates the initial values and stores the outcome if there is one.
Now if you change the StringSpacing for another model, it won't update "StringspacingBetweenStrings" anymore because it has lost the formula.
Now one could argue that those formulas should be calculated in the Model Parameters, but I need them in two different designs, so I need the formulas in the User Parameters - as formulas.
My questions would be:
-
could you add a choice to store params as formulas, if they are initially so.
-
and it would work a lot nicer, at least for me, if you would change the rows to columns, and vice versa: if one has >50 parameters one gets lost in the screen, scrolling to the right.
It would be marvellous if this would be possible! Thanks in advance.
Hello! Not sure if this is related to the similar thread on the Fusion 360 forum, but I think it is a good request. Going to be a bit of work to do, but I think i could do it. I'll let you know if/when I can do it.
I'd like to second this enhancement, unfortunately the way it works currently is a serious limitation. An alternative could be to allow the user to mask out which parameters should be driven by the spreadsheet and which should be left untouched.
Hello .. how viable would it be that when the parameters have formulas they are exported and imported from the google sheet?
At the moment when a value of a parameter is generated by a formula in the sheet, only the value of the result of the same is updated but not the formula itself ... so by bringing these data again the formulas are replaced by their results and there any subsequent parameterization is affected.
If this system saves these formulas in the google sheet even if it is as text to respect that when the information is imported or exported it remains unchanged I think it would be a solution ..
Thank you
You have a good point.
FusionSheeter is a work-around for the fact that Fusion360 does not work properly with parameters in different designs. I made a request a long time ago to Autodesk to take a look at this, but although there were a lot of positive responses and likes, the request seems to be ignored. The Fusion team seems to be more interested in things like Electronics nowadays.
I would prefer not to leave Fusion360 and handle all params, with formulas and all, within the system. It should be not so very difficult to share a certain set of User Parameters between Designs and that would make life a lot easier for a lot of people I suspect. But one can only wish.
Until then I decided to make my designs in one design - to avoid mistakes.
Thank you for your response!
Hello .. I agree 100% with you .. really not being able to share parameters between designs is my biggest limitation today with Fusion 360 .. Technically I don't see it so complex .. it would be enough to be able to define local variables and global variables so that when you Insert a component or design into another, you can access its variables and thus link them together.
Since we understand this limitation (which I trust that in a short term autodesk understands the advantages that it would bring and implements it in Fusion 360) .. let's continue with this Tapnair aggregate that really has its potential too .. This allows us beyond linking Parameters between designs, to have templates of values for our parameters .. besides being able to link this data in real time with the outside world to update their values ..
While I think it could still be more powerful, it already has great potential.
Again to make my query, would it be possible to mask these formulas so that the value of the variable is not taken but its content?
Ex.
A = 5
B = 10
C = A + B = 15
C value is "A + B" not "15"
It is understood ?
Ideally, the code would require a conversion function of the formulas between Fusion 360 and Google Sheets .. but it would be more complex ..
Ex.
Fusion 360: floor (15/2)
Google Sheets: = FLOOR.PRECISE (15/2)
But this would already be another more complex level ..
At the moment I chose to lose the dynamics of formulas in real time from Fusion 360 and I am generating the formulas in Google Sheets ..
From already thank you very much ..
Hello sorry for the delayed response. So i agree with the concept, but in practice I decided against allowing mixed strings and numbers in the same sheet. Managing which fields are strings and which are numeric (in the same column) during the call and response was too prone to errors. My recommendation as best practice is to implement the equations on the Google sheets side.
So In Fusion:
A=5
B=10
C=10
Then in Sheets, change the value of C to A+B (by columns)
This also requires the diligence to make your parameter edits in sheets and only "pull" the changes. because a "push" from Fusion would again override the formula.
I do like the idea of selective sync. I have been thinking about something simple like any parameter with an underscore pre-fix is automatically excluded from sync (assumed private).
The last alternative is the option to sync ALL parameters as strings. This is my least favorite approach, and feels as though it defeats the advantages of going to sheets in the first place.
Of course I am very interested in hearing your feedback?
Hello, I'm glad to be able to chat with you ..
I congratulate you on your scripts are very practical ..
Very daring of me but if I can I would like to give you an idea about the "ParamEdit" script ... I think it would be very useful to only show the parameters marked as favorites .. since many parameters are used simply to perform calculations and are not to modify values .. so when we use your script if we could select what we want to see to optimize the window it would be great ..
With regard to this other script I tell you that I think it is very good and in fact I am currently using it as you say .. I am handling the formulas from Google Sheets .. it works although it is not very practical .. so much for the name of the variables that they become the coordinates of the sheet, and because in reality it is not very practical to lose the formulas on the Fusion side ... for example. the formulas created from Google Sheets are updated when the sheet is synchronized with the Fusion project .. but if these formulas are linked to parameters of the objects we have in the project, the formula stops working until we load that modification to Google Sheets and we bring her back to Fusion ..
As in this example, many complications are generated, especially in complex designs and many dynamic variables.
Perhaps as an alternative it would be to be able to synchronize only some selectable parameters ... or use the favorites option again to synchronize only the parameters that have been marked with this label.
If I can collaborate on something to advance this just tell me and I will try to help ..
Regards,
Michel
That is a really good idea! That could solve this issue. Then a user could use "Favorite" parameters for static values and the other user parameters are potentially calculated and not synced with the sheet. This is very doable. I'll try to push this change asap. I think this is an excellent solution to the problem.
Hello thank you very much ! .. I appreciate that this idea can be useful to you ..
In what I can collaborate with you I am at your service ..
Regards!
I have made this change. Now when you create a new sheet there is the option to select favorite parameters. Note favorites can be coming from both User Parameters and regular model parameters. I think this will make for some interesting possibilities. Let me know how it works for you.