Like this:
If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("This rule '" & iLogicVb.RuleName & "' only works for Drawing Documents.",vbOK, "WRONG DOCUMENT TYPE")
Return
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oView As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a drawing view.")
If oView IsNot Nothing Then
If oView.ScaleFromBase = False Then
' oView.Scale = InputBox("Enter a decimal number as the new Scale of this View.", "CHANGE VIEW SCALE", oView.Scale)
oView.ScaleString = InputBox("Enter a String that represents the new Scale of this View.", "CHANGE VIEW SCALE", oView.ScaleString)
Else
MsgBox("The selected View's Scale is set by the Base View, and can't be changed this way.",vbOKOnly + vbExclamation," ")
End If
End If
By the way...the one line that is greyed out with a comment mark (oView.Scale = ), is there to show you an alternate way to change the scale. If you delete that little comment mark ( ' ) at the front of that line, it will cause that line to run, but you don't want both lines to run, so you'll have to leave one of those two lines commented out.
If you use the currently active line, you can type in a fraction, as you're probably used to, but if you'd rather type in a decimal, you can comment out the active line, then un-comment the other line.
Wesley Crihfield

(Not an Autodesk Employee)