AnsweredAssumed Answered

PADS Logic - Zoom to sheet extents for all sheets

Question asked by jduquette on Feb 1, 2011
Latest reply on Sep 11, 2013 by bradu

(resubmitted as a discussion instead of a document)

 

I like to zoom out all the pages of a schematic before I save it.  Here is a script to do that with a couple of clicks:

 

Sub Main

 

   Rem zoom to sheet extents for all sheets in schematic

 

   rem flag the present sheet
   presentSheet = ActiveDocument.ActiveSheet.Name
   
   Set shts = ActiveDocument.Sheets
   For n = 1 To shts.Count
  
       rem activate a sheet
       ActiveDocument.Sheets(n).Activate
  
       rem zoom to the full sheet
       ActiveDocument.ActiveView.SetExtentsToSheet
      
       rem capture the original sheet's index value
       thissheet = ActiveDocument.ActiveSheet.Name
       If thissheet = presentSheet Then gobacktosheet = n
      
    Next n
   
    rem redisplay the sheet that was active when the routine was called
    ActiveDocument.Sheets(gobacktosheet).Activate
   
End Sub

 

 

Does anyone know how to set up a keyboard shortcut to call this script?

Outcomes