Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2023.2 Object Library
PCDLRN ActiveX DLL > ReportControl Object : ScaleFactor Property
ScaleFactor Property
Description
A value of 1.00 = 100%.
Property type
Read-write property
Syntax
Visual Basic
Public Property ScaleFactor As Double
Return Type
Returns the scale factor as a Double value.
Example
Gets the current scale factor and then scales the Cad Report Object based on user input:
Dim DmisApp As Object
Dim DmisPart As Object
Dim DmisReport As Object
Dim ReportPages As Object
Dim ReportPage As Object
Dim RepControls As Object
Dim RepControl As Object
Dim I As Integer
Dim val As Double

Sub Main2

  Set DmisApp = CreateObject("PCDLRN.Application")
  Set DmisPart = DmisApp.ActivePartProgram
  Set DmisReport = DmisPart.ReportWindow
  Set ReportPages = DmisReport.Pages

  For Each ReportPage In ReportPages
     Set RepControls = ReportPage.ReportControls
     For I = 1 To RepControls.Count
       Set RepControl = RepControls.ItemControl(I)
       If (RepControl is Nothing) Then
          MsgBox "Nothing"
       Else
          If RepControl.Type = 26514 Then
            val = RepControl.ScaleFactor
            dblScaleFactor = InputBox ("Current scale factor is: " & val &  chr(13) & chr(10) & chr(13) & chr(10) &  "Type a new scale factor. Note that a value of 1.00 equals 100%.","Scale Factor")
            RepControl.ScaleFactor = dblScaleFactor
        End If
       End If
     Next I
  Next ReportPage 

DmisReport.RefreshReport

Set ReportPages = Nothing
Set DmisReport = Nothing
Set DmisPart = Nothing
Set DmisApp = Nothing
  
End Sub

Sub Main
   Main2
End Sub
See Also