Hi, I'm trying to have a report according to my needs.
I've an attribute named dc: um that's coming from the seed component. Is a choosing dropdown list: mq, mc, kg, etc..
particularly:
the field cost_tot should be conditioned in this way:
IF dc: um is equal to mq (according with is it choose in the dc list)
THEN cost_tot is = %a-m% * cost_unit (first operator could change for ex in %v-m% if is listed mc .. and so on)
I'm novice both SD both Ruby.
Could yopu help me?
Many thanx
Pier
I link file for analysys.
Tags:
The dynamic component attributes should have DC: in capital letters.
However, when I try to change it, it is converted back to lower case.
I will need to fix this and get you a new version.
Al
Many Thanks, if it is possible give me also the exact sintax ruby in order to get my report.
Note that I've to do different calculations depending on the choices made in the list DC: um
Ciao
Pier
You have dynamic component attributes on a group rather than a component.
We're you able to do this from SketchUp - or how did you place these attributes on the group?
We expect the definitions of dynamic component attributes to be stored on the Component Definition, and, of course, most groups do not have component definitions.
Can you place 'um' as a space design attribute instead, or else work with components rather than groups.
How did you place a dynamic component attribute on a group?
I can't find Tak2Ata. Perhaps that is not the exact name.
Can you find where it is mentioned on SketchUcation, and send me a link to that page?
We will probably need to find a way to access dynamic component attributes on groups to make this work for you.
Dear Pier and Al,
I'm watching your discussion about DC and the Tak2Ata plugin. I can only assume that Pier is talking about BST Building Structure Tools0.5.4 update Dec18, 2011 http://forums.sketchucation.com/viewtopic.php?t=35798.
I'm testing the plugin and I'm thinking how much info I could extract from the DC elements using SD.
Regards
Gregory
We posted a new version of SpaceDesign (see Downloads above) which will read dynamic component values from groups.
You will still have to enter the "dc: um" attribute name by hand. We read through all component definitions to find dynamic component names, but I did not want to have to read through all groups.
Give it a try and let me know if it works for you.
Al Hart said:
The dynamic component attributes should have DC: in capital letters.
However, when I try to change it, it is converted back to lower case.
I will need to fix this and get you a new version.
Al
Dear Al,
I have the latest version of SD (LD30sd) and all the dynamic components attributes (DC: ...) cannot be input in CAPITAL letters. Only one of them can be in capital DC: the rest is automatically changed to lower case dc:. At the same time it would allow you to EDIT the lower case attribute to be capital but subsequently removes/changes the previously set to lower case.
Regards
Gregory
Hi to all crew,
That's true, I'vethe same problem with imput capital letters in DC. Report seems to work the same, but I'm still waiting for some help for my ruby script problems. I've seen as Gregory work it out the report for different unit_measure, but I'm serching for more synthetic solution.Anyway thank you Gregory
ciao
Pier
GTM said:
Dear Al,
I have the latest version of SD (LD30sd) and all the dynamic components attributes (DC: ...) cannot be input in CAPITAL letters. Only one of them can be in capital DC: the rest is automatically changed to lower case dc:. At the same time it would allow you to EDIT the lower case attribute to be capital but subsequently removes/changes the previously set to lower case.Regards
Gregory
Hi Pier,
I don't know Ruby but looking at some examples online like:
x=1
if x > 2 puts "x is greater than 2"
elsif x <= 2 and x!=0 puts "x is 1"
else puts "I can't guess the number" end
and substituting the case expression (x=1) and conditions (if ... , elsif ... , else ...) to
%DC: um%=m2
if %DC: um%=m3 puts %cost_unit% * %volume%
elsif %DC: um%=m puts %cost_unit% * %DC: lenx%
else put "way of measurement is not defined" end
I wonder if the case expression (%DC: um%=m2) should be numeric (number) rather than letter + number (m2) ?
I think Ruby has some problem with the m2.
Otherwise we have to dig somewhere else.
Al,
Is my thinking correct or am I completely wrong.
Regards
Gregory
Enter a phrase here to search the entire Render Plus web site:
© 2024 Created by Render Plus. Powered by