• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

volume value without exponent

  • Thread starter Thread starter and
  • Start date Start date

and

Guest
saves you can calculate the volume (in dm3) in a number without exponent
This is my ilogic code:

syntaxeditor code snippetiproperties.value("custom", "volume") = math.round(iproperties.volume / 1000000), 5).tostring

result: 1e-05!!

real is 0.012378
 
real is before calculation if I look at it in the physical property tab. .
I divide it for 1000000 to turn it into dm3
 
ok, but if you divide 0.012378/1000000 becomes 0.000000012378 then holding 5 decimals = 0
 
no the initial value is in mm3 and 12,378 and to convert it to dm3 I must divide it by 1000000
then it becomes 0.00012378 that pero inventor me displays it as 1e-05
 
real is before calculation if I look at it in the physical property tab. .
from 0.012378 have we passed to 12,378 as real value to divide?

also excel displays exponential values (1e-05) but you have not yet mentioned where you view it or where you want to view it. . .this value in cm3
 
here are the values where I see them

in the custom tab and I made it compute with the ilogic:
syntaxeditor code snippetiproperties.value("custom", "volume_dm3") = math.round(iproperties.volume / 1000000), 5).tostring
 

Attachments

  • 2.webp
    2.webp
    7.5 KB · Views: 4
  • 1.webp
    1.webp
    23.5 KB · Views: 4
Okay, but it gives you a syntax error.

"tostring" is a function that returns a string but must be written "tostring()".

try to use "cstr(math.round(iproperties.volume / 1000000), 5)" for string conversion.
 
Okay, but it gives you a syntax error.

"tostring" is a function that returns a string but must be written "tostring()".

try to use "cstr(math.round(iproperties.volume / 1000000), 5)" for string conversion.
even with your function always returns me = 1e-5!!
 
Okay, I'm sorry, but in a hurry, I neglected an important detail.
Code:
iproperties.value("custom", "volume_dm3") = math.round(iproperties.volume / 1000000, 5).tostring("0.#####")
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top