POST
|
No, that didn't work. I removed the quotes, and it threw an exception, "No such function:bool ==(a:str,b:float)".
... View more
03-05-2012
11:42 AM
|
0
|
0
|
172
|
POST
|
Matthias, I have learned so much in the last few weeks, so thank you! You've helped without doing the project for me and it's much appreciated. I've deleted my last two posts because I figured out the exceptions that my script was throwing. So I've been trying on and off all day on stuff, now I've gotten to the point where my linking between the Stories attribute and the Stories Case statements exist. When they're linked, and I change the SOURCE from Rule to Object, the value in the stories attribute disappears from my attributes table and there's no extrusion in the scene. It's got to be a scripting problem. attr Stories = "" attr ZONING_1 = "" Lot--> case ZONING_1 == "RURAL" : color ("#00C957") Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#00611C") Shape02. case ZONING_1 == "CORE RESIDENTIAL" : color ("#C82536") Shape03. case ZONING_1 == "RES A" : color ("#CD5B45") Shape04. case ZONING_1 == "RES B" : color ("#C73F17") Shape05. case ZONING_1 == "INDUSTRIAL" : color ("#C77826") Shape06. case ZONING_1 == "RURAL LIGHT INDUSTRIAL" : color ("#C8F526") Shape07. case ZONING_1 == "PDD" : color ("#CAFF70") Shape08. case ZONING_1 == "RURAL HAMLET" : color ("#CC4E5C") Shape09. case ZONING_1 == "RESIDENTIAL LARGE LOT" : color ("#CC1100") Shape10. case ZONING_1 == "HAMLET" : color ("#C67171") Shape11. case ZONING_1 == "COMMERCIAL HAMLET" : color ("#CC00FF") Shape12. case ZONING_1 == "RIVERFRONT RURAL" : color ("#00FFAA") Shape13. case ZONING_1 == "COMMERCIAL" : color ("#008B45") Shape14. case ZONING_1 == "RES C" : color ("#C82536") extrude(20) Shape15. case ZONING_1 == "MULTI-FAMILY" : color ("#C71585") Shape16. case Stories == "1" : extrude(10) case Stories == "2" : extrude(20) case Stories == "3" : extrude(30) else : NIL
... View more
03-01-2012
07:30 PM
|
0
|
0
|
172
|
POST
|
I tried this below and it worked great but I need to understand why the code I pasted at the bottom didn't work. attr ZONING_1 = "" @Startrule Lot--> case ZONING_1 == "RURAL" : color ("#00C957") extrude(20) Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#00611C") extrude(30) Shape02. case ZONING_1 == "CORE RESIDENTIAL" : color ("#C82536") extrude(20) Shape03. case ZONING_1 == "RES A" : color ("#CD5B45") extrude(20) Shape04. case ZONING_1 == "RES B" : color ("#C73F17") extrude(20) Shape05. case ZONING_1 == "INDUSTRIAL" : color ("#C77826") extrude(40) Shape06. case ZONING_1 == "RURAL LIGHT INDUSTRIAL" : color ("#C8F526") extrude(30) Shape07. case ZONING_1 == "PDD" : color ("#CAFF70") extrude(20) Shape08. case ZONING_1 == "RURAL HAMLET" : color ("#CC4E5C") extrude(20) Shape09. case ZONING_1 == "RESIDENTIAL LARGE LOT" : color ("#CC1100") extrude(20) Shape10. case ZONING_1 == "HAMLET" : color ("#C67171") extrude(20) Shape11. case ZONING_1 == "COMMERCIAL HAMLET" : color ("#CC00FF") extrude(30) Shape12. case ZONING_1 == "RIVERFRONT RURAL" : color ("#00FFAA") extrude(30) Shape13. case ZONING_1 == "COMMERCIAL" : color ("#008B45") extrude(40) Shape14. case ZONING_1 == "RES C" : color ("#C82536") extrude(20) Shape15. case ZONING_1 == "MULTI-FAMILY" : color ("#C71585") extrude(40) Shape16. else : NIL Shape17. This below is the code I'm trying to make work. I want to eventually add other cases and classes. attr ZONING_1 = "" attr Stories = "Building Height" @Startrule Lot--> case ZONING_1 == "RURAL" : color ("#00C957") case Stories == "1" : extrude(10) : (Throws exception) case Stories == "2" : extrude(20) : (Throws exception) case Stories == "3" : extrude(30) : (Throws exception) else : NIL Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : (Throws exception) color ("#00611C") extrude(30) Shape02. case ZONING_1 == "CORE RESIDENTIAL" : color ("#C82536") extrude(20) Shape03. case ZONING_1 == "RES A" : color ("#CD5B45") extrude(20) Shape04. case ZONING_1 == "RES B" : color ("#C73F17") extrude(20) Shape05. case ZONING_1 == "INDUSTRIAL" : color ("#C77826") extrude(40) Shape06. case ZONING_1 == "RURAL LIGHT INDUSTRIAL" : color ("#C8F526") extrude(30) Shape07. case ZONING_1 == "PDD" : color ("#CAFF70") extrude(20) Shape08. case ZONING_1 == "RURAL HAMLET" : color ("#CC4E5C") extrude(20) Shape09. case ZONING_1 == "RESIDENTIAL LARGE LOT" : color ("#CC1100") extrude(20) Shape10. case ZONING_1 == "HAMLET" : color ("#C67171") extrude(20) Shape11. case ZONING_1 == "COMMERCIAL HAMLET" : color ("#CC00FF") extrude(30) Shape12. case ZONING_1 == "RIVERFRONT RURAL" : color ("#00FFAA") extrude(30) Shape13. case ZONING_1 == "COMMERCIAL" : color ("#008B45") extrude(40) Shape14. case ZONING_1 == "RES C" : color ("#C82536") extrude(20) Shape15. case ZONING_1 == "MULTI-FAMILY" : color ("#C71585") extrude(40) Shape16. else : NIL Shape17.
... View more
03-01-2012
11:14 AM
|
0
|
0
|
391
|
POST
|
When I close with "Else" on my case statements for Stories, the next "Case" statement throws an exception. One of the things I saw in other people's code is their Case statements had something to the effect of; Lot--> or anotherword--> For example: attr ZONING_1 = "" attr Stories = "" Lot--> case ZONING_1 = RURAL color ("#CCFFF0") Shape01. else : NIL LotBuilding--> case Stories == "1" : extrude(10) case Stories == "2" : extrude(20) else : NIL The lot building seems to separate the else statement and preventing my next case statement from throwing an exception. I hope this makes sense.
... View more
03-01-2012
09:00 AM
|
0
|
0
|
391
|
POST
|
Wow, it's all working now. Thank you so much for getting me and my project to this point. The rule file is correctly linked, the parcels have their corresponding colors and I'm starting the next phase which is to build the buildings. I'm looking at others threads and watching the videos, which is helping. I have added the attribute for stories and the extrude function. There's no errors but when I generate, nothing happens. The color is there but nothing extrudes. attr ZONING_1 = "" attr STORIES = "" Lot --> case ZONING_1 == "RURAL" : color ("#00C957") case STORIES == "1" : extrude(10) case STORIES == "2" : extrude(20) Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#00611C") case STORIES == "1" : extrude(10) case STORIES == "2" : extrude(20) Shape02. Or should I separate the extrusion from the coloring of the parcels. Like this?: attr ZONING_1 = "" attr STORIES = "" Lot --> case STORIES == "1" : extrude(10) case STORIES == "2" : extrude(20) case ZONING_1 == "RURAL" : color ("#00C957") Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#00611C") Shape02. I have more things to add like setback's, rooves and other things. I am just wondering what the best way to write this script.
... View more
02-29-2012
09:51 AM
|
0
|
0
|
391
|
POST
|
Thanks again. I tried what you said and all the parcels turned the color I inputed and the height of all increased 10 feet. I am going to try tinkering around with this some more but if you have the next step then I would appreciate it. You suggested something about "string" in one of your earlier posts to help me. Is that part of my problem?
... View more
02-28-2012
05:04 PM
|
0
|
0
|
391
|
POST
|
Thank you Matthias, The parcel's are still not changing color. I have 2 theories: 1. The rule says to change to #00C957 (emerald green), but what is supposed to change color? The parcel? the boundary of the parcel? I think the rule is missing some direction what to change, but I could be wrong. Maybe I need to build some height into each parcel and then the color will change? 2. Second idea is there is supposed to be something between the quotes in the attr ZONING_1= "" line, like below. . . attr ZONING_1 = "" Lot --> case ZONING_1 == "rural" : color ("#00C957") I owe you an incredible amount of appreciation. Thank you!
... View more
02-27-2012
06:55 PM
|
0
|
0
|
391
|
POST
|
hi Jose, is your attribute actually pointing to the right source ? does it say in the Inspector : ZONING_1 "" (Rule) ? if this is the case, you have to point the value to the object attr instead of using the rule value. use the connection editor button in the Inspector (white rectangle with black triangle) and connect to the object attr. let me know .. I don't have the Connection Editor button, or at least I can't find it. However, in the Inspector there is the Rule Parameter Bar, below that shows "Zoning_1" coming from my rule I assume. The "Source" was a '?' and now I changed it to "Object" and the "Value" is "Rural" in the appropriate parcels and "Mixed Economic Development" in the appropriate parcels. I also changed my rule so now it's attr ZONING_1 = "" Lot --> case ZONING_1 == "RURAL" : color("#56,193,55") Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color("#205,235,241") Shape02. else : NIL Shape03. Nothing changed, no colors changed. What did I miss?
... View more
02-15-2012
05:15 PM
|
0
|
0
|
391
|
POST
|
I am not seeing the triangle-rectangle shape. I have looked all over. [ATTACH=CONFIG]11977[/ATTACH]
... View more
02-14-2012
04:16 PM
|
0
|
0
|
562
|
POST
|
attr ZONING_1 = "01" Lot --> case ZONING_1 == "RURAL" : color ("#56,193,55") Shape01. case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#205,235,241") Shape02. else : NIL Shape03. This is my code right now, no errors so that's good. Problem is, nothing is changing colors, I tried extrusions and nothing came up. So there must be something wrong with mmy " ZONING_1 " reference. IDK if anyone can help here. My rule paremeters shows ZONING_1 so it be referrring to the rule, but there's no "value" listed, it's just an empty box to type in. I'm confused. Thanks to anyone that can help.
... View more
02-13-2012
07:04 PM
|
0
|
0
|
562
|
POST
|
I changed to another attribute to better clarify what that zoning is rather than just using a number as before, I had 3 zoning descriptors. I think I'm all good there but my parcels are not changing color. When I look at the actual parcels that should be affected they ahve the rule applied to them, but the "Value" is blank, i can type in it. Does the color only change if I extrude? attr ZONING_1 = "" Lot --> case ZONING_1 == "RURAL" : color ("#ff3300") case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#CC0033") else : NIL
... View more
02-13-2012
06:30 PM
|
0
|
0
|
562
|
POST
|
I changed to another attribute to better clarify what that zoning is rather than just using a number as before, I had 3 zoning descriptors. I think I'm all good there but my parcels are not changing color. When I look at the actual parcels that should be affected they ahve the rule applied to them, but the "Value" is blank, i can type in it. Does the color only change if I extrude? attr ZONING_1 = "" Lot --> case ZONING_1 == "RURAL" : color ("#ff3300") case ZONING_1 == "MIXED ECONOMIC DEVELOPMENT" : color ("#CC0033") else : NIL
... View more
02-13-2012
05:43 PM
|
0
|
0
|
562
|
POST
|
Here is my code attr zoning = case zoning == "01" : color (#f26522) case zoning == "02" : color (#f30034) else : The else is throwing an exception, what am I missing? Thanks for your help. hahaha, Nevermind I figured it out. Total learning experience. This is my code now attr zoning = "" Lot --> case zoning == "01" : color ("#f26522") case zoning == "02" : color ("#f30034") else : NIL I think my color codes are wrong because none of the parcels changed color, I'm not sure where or why I picked up a hexcolor code. Now if I want to go ahead and create the buildings for each parcel I can just do it like this: attr zoning = "" Lot --> case zoning == "01" : color ("#f26522") Extrude = Etc Etc case zoning == "02" : color ("#f30034") Etc Etc else : NIL Is this correct? I can just write the rules for each attribute under each case: attribute ???
... View more
02-13-2012
05:23 PM
|
0
|
0
|
562
|
POST
|
Here is my code attr zoning = case zoning == "01" : color (#f26522) case zoning == "02" : color (#f30034) else : The else is throwing an exception, what am I missing? Thanks for your help.
... View more
02-13-2012
05:06 PM
|
0
|
0
|
562
|
POST
|
Wow! Thank you! This was a huge help, I had some code right and some wrong. I'll let you know if I have any more trouble! Thank you!
... View more
02-06-2012
04:13 PM
|
0
|
0
|
562
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|