Without connectivity in the database, SKILL will have a hard time finding connections of the shapes/cells. You have to traverse the hierarchy and track the shapes on an instance by instance basis.
I would use the LVS commands in Diva, PVS or other LVS tools to trace the connections through the hierarchy. They can then place a marker on the dummy devices. Not only wll it be easier to code but will be much faster because the tracing is built in.