Hi, do you know if is possible to make logical calculation as: IF(....) with embedded condition?
thank you
Tags:
Yes - all calculations are executed in ruby. So you can do anything in a calcuation that you can do in ruby.
For instance the ruby expression:
cost = (weight < 100 ? weight * 1.5 : weight * 1.25)
returns 1.5 * weight it weight is less than 100, otherwise 1.25 * weight.
please, I have to work out this calculation in Ruby. I'm null with Ruby script..!
I have object unit definition choose from a DC list that contains: mq, mc, m, kg, num, ac, etc.
the unit_cost inserted manually
now I want to calculate the total_cost in different ways depending from the unit definition.
for example: if unit is = mq >> unit_cost * %a-m%
or
if unit is = mc >> unit_cost * %v-m%
and so on...
many thanks in advance to people that will help me.
ciao
pier
Hi Pier,
Are you able to attach one of the DC Components (with the predefined elements) to the post.
I did something similar with calculations on a standard Component/Group where all my desired options are listed and I can choose where to insert the cost, quantities, mass etc.
Have a look my Print Screens below.
Regards
Gregory
Hi,
first of all here the link to downolad test files
http://dl.dropbox.com/u/255954/Pier.zip
I managed to get something that works, but only if I replace the text values of m2, m3 and so on with numeric values as 1, 2 etc.. I think it's a syntax problem with my Ruby script in cost_tot.
The zip file has inside group seed_file multi-wall, skp model, attribute file SD.
NB: when the wall is the scene in the file skp model is grouped into one object called M1:DC to change the attributes with the sketchup tool, it must be opened with double click.
hello
pier
errata corridge
for mistake I've upload fault zip. Please substitute with http://dl.dropbox.com/u/255954/space_design_test.zip
pier
Enter a phrase here to search the entire Render Plus web site:
© 2024 Created by Render Plus. Powered by