db = mgGetCurrentDb()
print “Clearing Polygon Materials:”
def ClearMaterialIndex (db, parent, rec, i):
if (mgGetCode(rec) == fltPolygon):
mgSetAttList (rec, fltPolyMaterial, 0)
return MG_TRUE
print “Clearing Polygon Feature ID:”
def ClearFIDIndex (db, parent, rec, i):
if (mgGetCode(rec) == fltPolygon):
mgSetAttList (rec, fltPolyFid, 100)
return MG_TRUE
print “Clearing Polygon SMC:”
def ClearSMCIndex (db, parent, rec, i):
if (mgGetCode(rec) == fltPolygon):
mgSetAttList (rec, fltPolySmc, 1)
return MG_TRUE
print “Clearing Polygon RoofLine:”
def ClearRoofLineIndex (db, parent, rec, i):
if (mgGetCode(rec) == fltPolygon):
mgSetAttList (rec, fltPolyRoofline, 1)
return MG_TRUE
print “Clearing Polygon Comments:”
def ClearComments (db, parent, rec, i):
if (mgGetCode(rec) == fltPolygon):
mgSetAttList (rec, fltImgComment, ALRIGHT)
return MG_TRUE
db = mgGetCurrentDb ()
mgWalk (db, None, ClearMaterialIndex, None, MWALK_NOREADONLY)
db = mgGetCurrentDb ()
mgWalk (db, None, ClearFIDIndex, None, MWALK_NOREADONLY)
db = mgGetCurrentDb ()
mgWalk (db, None, ClearSMCIndex, None, MWALK_NOREADONLY)
db = mgGetCurrentDb ()
mgWalk (db, None, ClearRoofLineIndex, None, MWALK_NOREADONLY)
db = mgGetCurrentDb ()
mgWalk (db, None, ClearComments, None, MWALK_NOREADONLY)
Well the comments field doesn’t work, but otherwise this could be saved out as a mulit-attribute index group that gets flushed across the appropriate seleected polygons in one swipe ...! Duplicate for other sets and modify the appropriate values wanted in the next set (color 5, SMC 770 or whatever)
Any ideas on how to change the comments—think there was a script somewhere for that already
thanks this is cool