Spaces added Programatically to Zones cause discrepencies.

Spaces added Programatically to Zones cause discrepencies.

Anonymous
Not applicable
374 Views
1 Reply
Message 1 of 2

Spaces added Programatically to Zones cause discrepencies.

Anonymous
Not applicable

Hello,

I have madea custom script using the revit python shell that is designed to add the selected zones to a space selected from a list.  

The script completes successfully, but I have noticed that the zone does not appear correctly assigned/refreshed.

 

The Good:

The space shows that it is on the correct zone.  

The system browser shows the zone containing the space I just added. ( shown in attached pic)

 

The Bad:

The schedule of spaces shows the zone is still the default (shown in attached pic)

The color scheme does not correctly show the color, it almost looks like the color it is displaying is a mix of the correct color scheme by zone color and the  default color for spaces.

 

Any tips on how I can get this to be more successful?  The script is meant to help my workflow of assigning spaces to zones, because I find the out of the box function of editing the zone first to be inconvenient.

 

 

The relavent method from my script:

def ChooseZone(self, sender, args):
self.selectedZone = self.ExistingZonesListBox.SelectedItem
try:
print self.selectedZone.Parameter["Name"].AsString()
except BaseException as e:
print "Cou8ln't print name: ", e[0]
selectedSpaces = SpaceSet()
for space in sel:
try:
selectedSpaces.Insert(space)
except BaseException as e:
print "Couldn't add space to set: ", e[0]

t.Start()
try:
self.selectedZone.AddSpaces(selectedSpaces)
except BaseException as e:
print "Couldn't add spaceSet to Zone: ", e[0]
t.Commit()

0 Likes
375 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Update in case anyone was interested.  If I change a zone a couple of times the zone seems to sort itself out in the schedule.  The coloring is still strange, but at least I'm confident the zoning is correct in the model

0 Likes