Spaces added Programatically to Zones cause discrepencies.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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()