version "2012.1" attr MyAttribute = true Lot --> BuildingMass LotInner --> BuildingMass BuildingMass --> extrude(20) Building Building --> set(MyAttribute, true) color(1,1,0)
from scripting import * ce = CE() def main(): print shapes = ce.getObjectsFrom(ce.selection) for shape in shapes: print print shape print ce.getAttributeList(shape) print ce.getAttributeSource(shape, "/ce/rule/MyAttribute" ) print ce.getAttribute(shape, "/ce/rule/MyAttribute" ) if __name__ == '__main__': main()
Shape:MyBuilding.cga:Lot [] None None
Shape ['/ce/name', '/ce/rule/randomSeed', '/ce/rule/ruleFile', '/ce/rule/startRule', '0streetWidth\x00', '1streetWidth\x00', '2streetWidth\x00', '3streetWidth\x00', '4streetWidth\x00', 'shapeType'] DEFAULT None
print ce.getAttribute(ce.selection()[0], '/ce/rule/userModel')
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.