Hi, I am having a mind blank today - Is it possible to access and change a built in attribute via the set() function? Considering street networks; I am wanting to set the builtin streetWidth attribute based on the number of lanes and lane width given in the rule file, for an ideal outcome see:
the attr streetWidth is not inherited to the shapes as opposed to e.g. the connectionEnd Object Attributes. (the graph segments inherit some attributes down to their shapes).
if you select a street shape and have a look at it's Object Attributes, you see that they're inherited since they're written in italic (inherited = updates of the graph segment widths will be reflected in the shapes's OA). If you create a new Object Attr on this shape via RMB in the OA tab, you see that the new OA is written normal (not italic).
I know, it's tricky. 🙂
* * *
NOW. since there's no attr called streetWidth on Street Shapes, you can of course create one manually, but the trick is to map 'scope.sz' to this new attr since it represents the actual width of the shape. The initial scope orientation of Street Shapes is always that scope.sx is 'along' the street and scope.sz is it's width.
attr myStreetShapeWidth = 0 # initialize the new attr