Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data type when extracting from user parameters

1 REPLY 1
Reply
Message 1 of 2
will.proud
220 Views, 1 Reply

Data type when extracting from user parameters

Hi all,

 

I'm trying to automate volume calculation of a composite box with varying layups using API scripts. I've based my code on that suggested by Brian Elkins (https://forums.autodesk.com/t5/fusion-360-api-and-scripts/script-to-change-parameter-values/td-p/590...) but tried extracting the value rather than the expression, that is changed it to:

 

var_name = userParams.iteByName('Param_name).value 

 

However, when I run this it takes a decimal point off my value, i.e 100 becomes 10.0. I've tried converting it from float to integer but that didn't work.

 

Does anyone have any suggestions please? Thanks for your time.

1 REPLY 1

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