POST
|
I'd like the set operation to not just change the value of an attribute but also change the value that is displayed in the inspector, is this possible? attn. X = 1 The value of X in the inspector is 1 In the code I have the following line: set(X,2) The value of X in the inspector still is 1, how do I get it to display the current value set in the code?
... View more
12-04-2015
10:19 AM
|
0
|
0
|
2772
|
POST
|
I know that in Python you can prompt for input but I don't see anything documented for prompting for input with CE Python and the general method used in regular Python does not appear to work, e.g. "theTotPop = input("What is the Total Population: ")" does not work, the python script stops when it reaches this line. Is there a way to get input from the user in CE Python?
... View more
06-09-2014
10:48 AM
|
0
|
1
|
605
|
POST
|
I did find a way to get the total number of shapes selected, I just created a list of the selection and used the len method to get the number of items in the list: theShapeList=ce.getObjectsFrom(ce.selection(), ce.isShape)
size = len(theShapeList)
... View more
06-09-2014
09:43 AM
|
0
|
0
|
251
|
POST
|
I've selcted a number of parcel polygon shapes in my Viewport, now I want my python script to get the number of polygons I've got selected so I can use that number in a calculation. The standard Python count fucntion does not seem to work and I don't see a ce command listed that does counting. From a python script how would I go about finding out how many shapes I've got selected?
... View more
06-06-2014
02:14 PM
|
0
|
1
|
474
|
POST
|
Sorry, my mistake, so I'm answering my own enquiry. The line should not read "ce.setAttribute(ce.selection() [0], 'Pop', 99)" but rather "ce.setAttribute(ce.selection, 'Pop', 99)". No "() [0]" is required, this would limit the setAttribute function to the first item in the selection set, removing that it allowed the setAttribute to act on all objects in the selection.
... View more
06-06-2014
01:39 PM
|
0
|
0
|
234
|
POST
|
The script I want to write simply changes an object attribute value for all selected objects but what I find is that it will do 1, I assume the first one it finds, and ignores all of the rest. The case is that I select a number of parcel polygons and run the script, only one has had the "Pop" attribute changed to the value I specify, i.e. 99, the rest of the polygons do not change. The code is rather simple: ce = CE()
thePop = 1000
print ce.selection()
ce.setAttribute(ce.selection()[0], 'Pop', 99) The "print ce.selection()" line does return the proper number of objects but only one gets the Pop attribute modified. What am I missing?
... View more
06-06-2014
01:27 PM
|
0
|
1
|
442
|
POST
|
I'm applying either an L or U shape to my building and I find that I can't control where the L and U is oriented on the building, it appears that it defaults to the up slope side of the building regarless of which side I have identified as the front. Is there a way to control which side of the building the L or U is applied?
... View more
02-05-2014
05:43 AM
|
0
|
1
|
758
|
POST
|
Thanks for the tip Matt. Using attributes for the report items does indeed clean up 3/4 of the code I had be using for reporting. This is something I'll use from now on and, if I get a chance, I'll go back to previous rule files and clean them up as well. Thanks again, good tip!
... View more
01-28-2014
12:49 PM
|
0
|
0
|
642
|
POST
|
Thanks for the feedback Matt. I did manage to solve the problem, I was missing a component operation when I branched from the pedestal to the towers. As for the duplicate code, I'm not sure how I can clean it up, I'm dealing with a report that requires that I report on the 4 floor use types as well as having the ability to independently modify the floor use makeup of the pedestal and each of the 2 towers.
... View more
01-22-2014
08:03 AM
|
0
|
0
|
642
|
POST
|
So I've solved the extra wall issue but now I've got duplicate towers, one set that is extruding from the top floor of the pedestal but also a set that extrudes from the top of the first floor of the pedestal. I thought that the split only effected the current polygon? The model now looks like the following: [ATTACH=CONFIG]30663[/ATTACH] the code now looks like this: Pedestal -->
extrude(world.y, ((Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height)))
PedBuildingVolume3D
PedBuildingVolume3D -->
case (Groundfloor_Height != ((Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height))) : #pedestal height is NOT equal to height of just the ground floor
# the 3d volume will be split into smaller 3d volumes ! 1 ground floor volume will be created.
split(y) {Groundfloor_Height : Volume("GF") | ~1 : PedAllUpperFloors}
else:
split(y) {Groundfloor_Height : Volume("GF")}
report("NUMFLRS",NumFlrs)
Towers
PedAllUpperFloors -->
# the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign)
split(y) {~Upperfloor_Height : Volume("UF")}*
NIL
Towers
Volume(volumeType) -->
case volumeType == "GF" :
case ((split.index == 0) && (NumFlrsComm >= 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
report("SPLITTOT", split.total)
CommReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix >= 1)):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
report("SPLITTOT", split.total)
MixReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff >= 1)):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
report("SPLITTOT", split.total)
OffReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff == 0)):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
report("SPLITTOT", split.total)
ResReporting
MassReporting
else:
NIL
case volumeType == "UF" :
case ((split.total <= Num_Pedestal_Floors) && (((split.index + 1) <= (NumFlrsComm - 1)) && (NumFlrsComm > 1))):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top }
report("SPLITTOT", split.total)
CommReporting
MassReporting
case ((split.total <= Num_Pedestal_Floors) && ((split.index + 1) > (NumFlrsComm - 1)) && (NumFlrMix > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix) - 1))):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top }
report("SPLITTOT", split.total)
MixReporting
MassReporting
case ((split.total <= Num_Pedestal_Floors) && ((split.index + 1) > ((NumFlrsComm - 1) + (NumFlrMix - 1))) && (NumFlrOff > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix + NumFlrOff) - 1))):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top }
report("SPLITTOT", split.total)
OffReporting
MassReporting
case ((split.total <= Num_Pedestal_Floors) && (split.index + 1) > (NumFlrsComm + NumFlrMix + NumFlrOff) - 1):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top }
report("SPLITTOT", split.total)
ResReporting
MassReporting
else:
NIL
else:
NIL
Towers -->
case xLength > zLength :
split(x) {'.5 : Tower1 | '.5 : Tower2 } # I expected this split to split the polygon at the top of the pedestal, but it appears to
else : # also split the top of the first floor of the pedestal and extrudes from both location, why?
split(z) {'.5 : Tower1 | '.5 : Tower2 }
Tower1 -->
setback(FSetbackT1) { street.front : Concrete | remainder : T1Sub1 }
T1Sub1 --> setback(BSetbackT1) { street.back : Concrete | remainder : T1Sub2 }
T1Sub2 --> setback(LSetbackT1) { street.left : Concrete | remainder : T1Sub3 }
T1Sub3 --> setback(RSetbackT1) { street.right : Concrete | remainder : Tower1Extrude }
Tower1Extrude -->
extrude(world.y, (Tower1_Floors * Upperfloor_Height))
T1BuildingVolume3D
T1BuildingVolume3D -->
# the volume is split into upper floor volumes, as many times as possible ('*' sign)
split(y) {~Upperfloor_Height : T1Volume}*
T1Volume -->
case ((split.total <= Tower1_Floors) && (split.index <= (NumFlrComm1 - 1))):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top }
CommReporting
MassReporting
case ((split.total <= Tower1_Floors) && ((split.index > (NumFlrComm1 - 1)) && (NumFlrMix1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1) - 1)))):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top }
MixReporting
MassReporting
case ((split.total <= Tower1_Floors) && (((split.index) > ((NumFlrComm1 + NumFlrMix1) - 1)) && (NumFlrOff1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1)))):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top }
OffReporting
MassReporting
case ((split.total <= Tower1_Floors) && ((split.index) > (NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1)):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top }
ResReporting
MassReporting
else:
NIL
... View more
01-21-2014
06:43 AM
|
0
|
0
|
642
|
POST
|
I had to simplify the code to make it fit and I missed an else statement that should have been deleted. The new code is below: Pedestal -->
extrude(world.y, ((Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height)))
PedBuildingVolume3D
PedBuildingVolume3D -->
case (Groundfloor_Height != (Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height)) : #pedestal height is NOT equal to height of just the ground floor
# the 3d volume will be split into smaller 3d volumes ! 1 ground floor volume will be created.
split(y) {Groundfloor_Height : Volume("GF") | ~1 : PedAllUpperFloors}
else:
Volume("GF1")
Towers
PedAllUpperFloors -->
# the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign)
split(y) {~Upperfloor_Height : Volume("UF")}*
Towers
Volume(volumeType) -->
case volumeType == "GF1" :
case ((split.index == 0) && (NumFlrsComm >= 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
CommReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix >= 1)):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
MixReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff >= 1)):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
OffReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff == 0)):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
ResReporting
MassReporting
else:
NIL
case volumeType == "GF" :
case ((split.index == 0) && (NumFlrsComm >= 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
CommReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix >= 1)):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
MixReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff >= 1)):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
OffReporting
MassReporting
case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff == 0)):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top | all: NIL }
set(material.opacity,OpacityVal)
ResReporting
MassReporting
else:
NIL
case volumeType == "UF" :
case (((split.index + 1) <= (NumFlrsComm - 1)) && (NumFlrsComm > 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top }
CommReporting
MassReporting
case (((split.index + 1) > (NumFlrsComm - 1)) && (NumFlrMix > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix) - 1))):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top }
MixReporting
MassReporting
case (((split.index + 1) > ((NumFlrsComm - 1) + (NumFlrMix - 1))) && (NumFlrOff > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix + NumFlrOff) - 1))):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top }
OffReporting
MassReporting
case ((split.index + 1) > (NumFlrsComm + NumFlrMix + NumFlrOff) - 1):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top }
ResReporting
MassReporting
else:
NIL
else:
NIL
Towers -->
case xLength > zLength :
split(x) {theLength/2 : Tower1 | ~1 : Tower2 }
else :
split(z) {(theLength/2) : Tower1 | ~1 : Tower2 }
Tower1 -->
setback(FSetbackT1) { street.front : Concrete | remainder : T1Sub1 }
T1Sub1 --> setback(BSetbackT1) { street.back : Concrete | remainder : T1Sub2 }
T1Sub2 --> setback(LSetbackT1) { street.left : Concrete | remainder : T1Sub3 }
T1Sub3 --> setback(RSetbackT1) { street.right : Concrete | remainder : Tower1Extrude }
Tower1Extrude -->
extrude(world.y, (Tower1_Floors * Upperfloor_Height))
T1BuildingVolume3D
T1BuildingVolume3D -->
# the volume is split into upper floor volumes, as many times as possible ('*' sign)
split(y) {~Upperfloor_Height : T1Volume}*
T1Volume -->
case (split.index <= (NumFlrComm1 - 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top }
CommReporting
MassReporting
case ((split.index > (NumFlrComm1 - 1)) && (NumFlrMix1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1) - 1))):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top }
MixReporting
MassReporting
case (((split.index) > ((NumFlrComm1 + NumFlrMix1) - 1)) && (NumFlrOff1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1))):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top }
OffReporting
MassReporting
case ((split.index) > (NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top }
ResReporting
MassReporting
else:
NIL
Tower2 -->
setback(FSetbackT2) { street.front : Concrete | remainder : T2Sub1 }
T2Sub1 --> setback(BSetbackT2) { street.back : Concrete | remainder : T2Sub2 }
T2Sub2 --> setback(LSetbackT2) { street.left : Concrete | remainder : T2Sub3 }
T2Sub3 --> setback(RSetbackT2) { street.right : Concrete | remainder : Tower2Extrude }
Tower2Extrude -->
extrude(world.y, (Tower2_Floors * Upperfloor_Height))
T2BuildingVolume3D
T2BuildingVolume3D -->
# the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign)
split(y) {~Upperfloor_Height : T2Volume}*
T2Volume -->
case (split.index <= (NumFlrComm2 - 1)):
comp(f){side: Simple_Com | bottom: FloorBottom | top : Top }
CommReporting
MassReporting
case ((split.index > (NumFlrComm2 - 1)) && (NumFlrMix2 > 0) && ((split.index) <= ((NumFlrComm2 + NumFlrMix2) - 1))):
comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top }
MixReporting
MassReporting
case (((split.index) > ((NumFlrComm2 + NumFlrMix2) - 1)) && (NumFlrOff2 > 0) && ((split.index) <= ((NumFlrComm2 + NumFlrMix2 + NumFlrOff2) - 1))):
comp(f){side: Simple_Off | bottom: FloorBottom | top : Top }
OffReporting
MassReporting
case ((split.index) > (NumFlrComm2 + NumFlrMix2 + NumFlrOff2) - 1):
comp(f){side: Simple_Res | bottom: FloorBottom | top : Top }
ResReporting
MassReporting
else:
NIL
Simple_Com --> color(ComColor)
set(material.opacity,OpacityVal)
Simple_Mix --> color(MixColor)
set(material.opacity,OpacityVal)
Simple_Off --> color(OffColor)
set(material.opacity,OpacityVal)
Simple_Res --> color(ResColor)
set(material.opacity,OpacityVal)
... View more
01-20-2014
11:32 AM
|
0
|
0
|
642
|
POST
|
I've got a CGA rule that creates a building that has a pedestal and 2 towers on top of the pedestal. The towers are set back from the edge of the pedestal and then extruded, they look okay as well except that duplicate walls are created that extend from the edge of the pedestal, as in the image below: [ATTACH=CONFIG]30640[/ATTACH] the code I used is below, can anyone tell me what I did to cause this phenomenon? Pedestal --> extrude(world.y, ((Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height))) PedBuildingVolume3D PedBuildingVolume3D --> case (Groundfloor_Height != (Num_Pedestal_Floors * Upperfloor_Height) + (Groundfloor_Height - Upperfloor_Height)) : #pedestal height is NOT equal to height of just the ground floor # the 3d volume will be split into smaller 3d volumes ! 1 ground floor volume will be created. split(y) {Groundfloor_Height : Volume("GF") | ~1 : PedAllUpperFloors} else: Volume("GF1") Towers PedAllUpperFloors --> # the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign) split(y) {~Upperfloor_Height : Volume("UF")}* Towers Volume(volumeType) --> case volumeType == "GF1" : case ((split.index == 0) && (NumFlrsComm >= 1)): comp(f){side: Simple_Com | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) CommReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix >= 1)): comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) MixReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff >= 1)): comp(f){side: Simple_Off | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) OffReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff == 0)): comp(f){side: Simple_Res | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) ResReporting MassReporting else: NIL case volumeType == "GF" : case ((split.index == 0) && (NumFlrsComm >= 1)): comp(f){side: Simple_Com | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) CommReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix >= 1)): comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) MixReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff >= 1)): comp(f){side: Simple_Off | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) OffReporting MassReporting case ((split.index == 0) && (NumFlrsComm == 0) && (NumFlrMix == 0) && (NumFlrOff == 0)): comp(f){side: Simple_Res | bottom: FloorBottom | top : Top | all: NIL } set(material.opacity,OpacityVal) ResReporting MassReporting else: NIL case volumeType == "UF" : case (((split.index + 1) <= (NumFlrsComm - 1)) && (NumFlrsComm > 1)): comp(f){side: Simple_Com | bottom: FloorBottom | top : Top } CommReporting MassReporting case (((split.index + 1) > (NumFlrsComm - 1)) && (NumFlrMix > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix) - 1))): comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top } MixReporting MassReporting case (((split.index + 1) > ((NumFlrsComm - 1) + (NumFlrMix - 1))) && (NumFlrOff > 0) && ((split.index + 1) <= ((NumFlrsComm + NumFlrMix + NumFlrOff) - 1))): comp(f){side: Simple_Off | bottom: FloorBottom | top : Top } OffReporting MassReporting case ((split.index + 1) > (NumFlrsComm + NumFlrMix + NumFlrOff) - 1): comp(f){side: Simple_Res | bottom: FloorBottom | top : Top } ResReporting MassReporting else: NIL else: NIL Towers --> case xLength > zLength : split(x) {theLength/2 : Tower1 | ~1 : Tower2 } else : split(z) {(theLength/2) : Tower1 | ~1 : Tower2 } Tower1 --> setback(FSetbackT1) { street.front : Concrete | remainder : T1Sub1 } T1Sub1 --> setback(BSetbackT1) { street.back : Concrete | remainder : T1Sub2 } T1Sub2 --> setback(LSetbackT1) { street.left : Concrete | remainder : T1Sub3 } T1Sub3 --> setback(RSetbackT1) { street.right : Concrete | remainder : Tower1Extrude } Tower1Extrude --> extrude(world.y, (Tower1_Floors * Upperfloor_Height)) T1BuildingVolume3D T1BuildingVolume3D --> # the volume is split into upper floor volumes, as many times as possible ('*' sign) split(y) {~Upperfloor_Height : T1Volume}* T1Volume --> case (split.index <= (NumFlrComm1 - 1)): comp(f){side: Simple_Com | bottom: FloorBottom | top : Top } CommReporting MassReporting case ((split.index > (NumFlrComm1 - 1)) && (NumFlrMix1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1) - 1))): comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top } MixReporting MassReporting case (((split.index) > ((NumFlrComm1 + NumFlrMix1) - 1)) && (NumFlrOff1 > 0) && ((split.index) <= ((NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1))): comp(f){side: Simple_Off | bottom: FloorBottom | top : Top } OffReporting MassReporting case ((split.index) > (NumFlrComm1 + NumFlrMix1 + NumFlrOff1) - 1): else: comp(f){side: Simple_Res | bottom: FloorBottom | top : Top } ResReporting MassReporting else: NIL Tower2 --> setback(FSetbackT2) { street.front : Concrete | remainder : T2Sub1 } T2Sub1 --> setback(BSetbackT2) { street.back : Concrete | remainder : T2Sub2 } T2Sub2 --> setback(LSetbackT2) { street.left : Concrete | remainder : T2Sub3 } T2Sub3 --> setback(RSetbackT2) { street.right : Concrete | remainder : Tower2Extrude } Tower2Extrude --> extrude(world.y, (Tower2_Floors * Upperfloor_Height)) T2BuildingVolume3D T2BuildingVolume3D --> # the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign) split(y) {~Upperfloor_Height : T2Volume}* T2Volume --> case (split.index <= (NumFlrComm2 - 1)): comp(f){side: Simple_Com | bottom: FloorBottom | top : Top } CommReporting MassReporting case ((split.index > (NumFlrComm2 - 1)) && (NumFlrMix2 > 0) && ((split.index) <= ((NumFlrComm2 + NumFlrMix2) - 1))): comp(f){side: Simple_Mix | bottom: FloorBottom | top : Top } MixReporting MassReporting case (((split.index) > ((NumFlrComm2 + NumFlrMix2) - 1)) && (NumFlrOff2 > 0) && ((split.index) <= ((NumFlrComm2 + NumFlrMix2 + NumFlrOff2) - 1))): comp(f){side: Simple_Off | bottom: FloorBottom | top : Top } OffReporting MassReporting case ((split.index) > (NumFlrComm2 + NumFlrMix2 + NumFlrOff2) - 1): comp(f){side: Simple_Res | bottom: FloorBottom | top : Top } ResReporting MassReporting else: NIL Simple_Com --> color(ComColor) set(material.opacity,OpacityVal) Simple_Mix --> color(MixColor) set(material.opacity,OpacityVal) Simple_Off --> color(OffColor) set(material.opacity,OpacityVal) Simple_Res --> color(ResColor) set(material.opacity,OpacityVal)
... View more
01-20-2014
11:26 AM
|
0
|
6
|
1003
|
POST
|
Thanks again Matthias, Yes, I had seen that video before, but some time ago. I re-watched it and it did clear some things up for me. I was able to get the report I needed.
... View more
01-20-2014
07:54 AM
|
0
|
0
|
569
|
POST
|
Thanks Matthias, Using the split.index did work just fine. I also did as you suggested and modified the code to remove the repetitive reporting code. I do have another question though, is there a way to add to an attribute as you go through the reporting mechanism? I want to report the required number of parking stalls required for a building based on the gross floor area and a stall requirment factor but I get odd results if I simply use the geometry.area and the rint function in the mass reporting rule, i.e. rint(((geometry.area -(geometry.area * .15))/StallFactor))), I assume this is because the numbers are smaller on a floor by floor basis and as you round these numbers then combine them the amount lost through rounding is compounded. Is there a way to make the same calculation on the full GFA rather than doing it incrementally. I tried using a set(attribute1, attribute1 + geometry.area) within the reporting rule and it when I reported the attribute1 it gave me the right answer, 10809.84, but when I plugged attribute1 into the calcualtion above, report("attribute1 value", ((attribute1 - (attribute1 * .15)/140))) I got 10798.26 as a result, I expected 65.53. If I try to use attribute1 outside of the reporting rule it appears the value is 0. What am I not seeing here?
... View more
01-09-2014
07:37 AM
|
0
|
0
|
569
|
POST
|
I'm having a problem getting a use assigned to the individual floors of building creted using an envelope. I'm able to do it when the building is created using extrusionbut with the envelope the floor index does not appear to work. The report does indicate the CurrentFloorIndex is increased but the floors are not displayed properly concernig their use. Below is some or code I used, this code is simplified so we're only dealing with commercial and residential floors but in reality I would, want to expand this to include mixed and office floors. Building--> setupProjection(0, scope.xz, 500, 500) envelope(MaxHeight, FrontBaseHgt, FrontAngle, RearBaseheight, RearAngle, SideBaseheight, SideAngle ) #comp(f) {top : Top } BuildingVolume3D BuildingVolume3D --> # the 3d volume will not be split into smaller 3d volumes ! 1 ground floor volume will be created. alignScopeToAxes(y) split(y) {GroundFloorHeight : Volume("GF") | ~1 : AllUpperFloors} AllUpperFloors --> alignScopeToAxes(y) split(y) {~UpperFloorHeight : Volume("UF")}* NIL Volume(volumeType) --> case volumeType == "GF" : case NumFlrComm > 0: case LOD == 1: comp(f){side: GFloorSide | bottom: FloorBottom} set(material.opacity,0.8) report("1 Ground Flr Area", geometry.area(bottom)) report("1 Ground Flr Revenue", (geometry.area(bottom) * GFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * GFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: comp(f){side: GFloorSideS | bottom: FloorBottom} report("1 Ground Flr Area", geometry.area(bottom)) report("1 Ground Flr Revenue", (geometry.area(bottom) * GFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * GFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: case LOD == 1: comp(f){side: FloorSideRes | bottom: FloorBottom | top : Top} set(material.opacity,0.8) report("2 Res Flr Area", geometry.area(bottom)) report("2 Res Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: comp(f){side: FloorSideSRes | bottom: FloorBottom | top : Top} report("2 Upper Flr Area", geometry.area(bottom)) report("2 Upper Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else : case currentFloorIndex <= NumFlrComm: case LOD == 1: comp(f){side: FloorSideC | bottom: FloorBottom | top : Top} set(material.opacity,0.8) report("2 Comm Flr Area", geometry.area(bottom)) report("2 Comm Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: comp(f){side: FloorSideSC | bottom: FloorBottom | top : Top} report("2 Comm Flr Area", geometry.area(bottom)) report("2 Comm Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: case LOD == 1: comp(f){side: FloorSideRes | bottom: FloorBottom | top : Top} set(material.opacity,0.8) report("2 Res Flr Area", geometry.area(bottom)) report("2 Res Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting else: comp(f){side: FloorSideSRes | bottom: FloorBottom | top : Top} report("2 Upper Flr Area", geometry.area(bottom)) report("2 Upper Flr Revenue", (geometry.area(bottom) * UFRate)) set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate)) report("3 Total Revenue", TotRevenue) set (currentFloorIndex, currentFloorIndex + 1) report("NUMBER OF FLRS", currentFloorIndex) MassReporting The building this creates is always just symbolozed as commercial, no residential at all: [ATTACH=CONFIG]30228[/ATTACH] The only time I get something other than commercial (red) is if I set the NumFlrComm attribute to 0 in the Inspector. It appears that "set (currentFloorIndex, currentFloorIndex + 1)" is not effecting the "Volume(volumeType) -->" rule, although the number of floors is reported correctly in the report. Any one have any idea how I can rearrange this so the currentFloorIndex is used correctly.
... View more
01-03-2014
08:33 AM
|
0
|
5
|
1002
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|