@Anonymous, here's a rule that gives you both options. For easy testing, I took out the custom scaling code is in some of the versions above. You should be able to add that back in if you need it.
Sub Main
SetSymbolScale("SymbolX", LogoScale, True) ' Change only the active sheet
SetSymbolScale("SymbolX", LogoScale, False, "Sheet - Phase") ' Change only sheets that start with a prefix
End Sub
Sub SetSymbolScale(symbolName As String, scale As Double, activeSheetOnly As Boolean, Optional sheetPrefix As String = "")
Dim drawingDoc As DrawingDocument = TryCast(ThisDoc.Document, DrawingDocument)
If (drawingDoc Is Nothing) Then Return
If (scale <= 0) Then Return
For Each sheetX As Sheet In drawingDoc.Sheets
If Not (activeSheetOnly AndAlso sheetX IsNot drawingDoc.ActiveSheet) Then
If String.IsNullOrEmpty(sheetPrefix) OrElse sheetX.Name.StartsWith(sheetPrefix, StringComparison.OrdinalIgnoreCase) Then
sheetSize = ThisDrawing.Sheet(sheetX.Name).Size
For Each sketched As SketchedSymbol In sheetX.SketchedSymbols
sketched.Scale = scale
Next
End If
End If
Next
End Sub
Mike Deck
Software Developer
Autodesk, Inc.