cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
cad developer
Contributor

Is there a way to limit decimal or round off values coming from API?

Hi,

 

As the subject suggests there is a need to limit the decimal of the property values that is coming from an API. 

The decimal limited value should be rounded off to the specified decimal. 

 

For example the property 'volume' of 'API_RailingBalusterQuantity' is giving a value of 7.1108929735418900e-05 or 0.0000711089297354189, but we would like that value to be rounded off to 4 decimal places. 

 

The value should be '0.0001'. 

 

Please help me on this. 

 

Thanks & Regards

1 Solution

Accepted Solutions
Miha Nahtigal
Expert

I dont exactly understand the question.

 

The result of API_RailingBalusterQuantity() gets stored to local variable. After that you can round it as you desire using c/c++ functions/routines like round().

BIMquants.comBETA - Free Plugin for Quantities and Costs Estimation in Archicad.

Go to post

1 Reply 1
Miha Nahtigal
Expert

I dont exactly understand the question.

 

The result of API_RailingBalusterQuantity() gets stored to local variable. After that you can round it as you desire using c/c++ functions/routines like round().

BIMquants.comBETA - Free Plugin for Quantities and Costs Estimation in Archicad.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!