Thank you Pat, much appreciated.
I got it working with the script below. With T=VIEWPORT I can get it to work for both section and regular viewports. Very nice, but for some weird way, the script isn't working on all sheet layers. The layer name reported back by AlrtDialog gives the correct name, but it's not working. Do you have any ideas/suggestions?
PROCEDURE SelectViewport;
VAR
MyLayer : STRING;
MyCriteria : STRING;
BEGIN;
MyLayer:= GetLName(ActLayer);
MyCriteria:=Concat('(((L=', MyLayer, ') & (T=VIEWPORT)))');
AlrtDialog(MyCriteria);
SelectObj(MyCriteria);
END;
Run(SelectViewport);