Flips the Cad Reporting Object either horizontally or vertically
Visual Basic |
---|
Public Function FlipCROView( _ ByVal _isVertical As Long _ ) As Long |
- _isVertical
Long value of 0 or 1:
0 - flips the CRO horizontally
1 - flips the CRO vertically
Returns 1 if the flip succeeds and 0 otherwise.
Flips the CRO vertically or horizontally, based on user input.
Example (VBScript) | Copy Code |
---|---|
Sub Main Dim App As Object Set App = CreateObject ("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim RprtWindow As Object Set RprtWindow = Part.ReportWindow Dim Pages As Object Set Pages = RprtWindow.Pages Dim Page As Object Set Page = Pages.Item(1) Dim RptControls As Object Set RptControls = Page.ReportControls Dim Control As Object Dim Cmd As Object Dim Count As Integer Count = RptControls.Count Dim Index As Integer Index = 1 While (index <=Count) Set Control = RptControls.itemControl (index) If Control.Type = 26514 Then intFlip = InputBox ("CAD Report Object found with ID: " & Control.id & " Type 1 to flip it vertically. Type 0 to flip it horizontally.","Flip CRO") Control.FlipCROView intFlip RptWindow.RefreshReport End If index = index+1 Wend End Sub |