Let’s suppose you have imported a graph/streetnetwork (from a shapefile) with some attributes that define what type of line it is.
In this example I am using the graph network for water features as well as roads. Obviously not all rivers have sidewalks (pavements in the UK) so I want to set them to zero.
First add your New Map Layer as a function and make sure the map layer is covering your data. I change the colour from white to another colour, so I can see how big the function layer is and where it is (you need to look in the Inspector window for this).
Now this is what I have used to set the sidewalkwidths to zero using an imported graphs attributes. Copy and paste then amend this code to your data:
sww = getObjectAttr("Surface") //read from your imported graph the appropriate attribute class = getObjectAttr("Class") //the following performs a test that if the attribute is any of the following then the width is zero attr sidewalkWidthRight = case sww == "Unmade": 0 case sww == "water": 0 case class == "Arterial": 0 case class == "CityCoverageBoundary": 0 else: 2 attr sidewalkWidthLeft = case sww == "Unmade": 0 case sww == "water": 0 case class == "Arterial": 0 case class == "CityCoverageBoundary": 0 else: 2