You need to create a data structure which maps the routing layer to the top, bottom and via layers. This can be a table keyed on the drawing layer. The table value could be a disembodied property list which has the slots of topLayer, bottomLayer, topVia , bottomVia and the design rules or get the design rules from the techfile.
sheildTable = makeTable( "layers" nil)
sheildTable["metal2"] = list( nil topLayer "metal3" topVia "via23" topRules list(.2 .2 .3 .01 .01) bottomLayer "metal1" bottomVia "via12" ....)
The table is keyed by the current layer, the value is then parsed to get the layers associated and the rules and then passed to the rodCreatePath. This information can be stored in the controls section of the techfile if necessary.