PC-DMIS 2022.1 Object Library
FlipCROViewByAxis Method
See Also  Example  Send Topic Feedback | See Object Hierarchy Chart
_axisToUse

Integer value of 0, 1, or 2:

0 - X axis

1 - Y axis

2 - Z axis

PCDLRN ActiveX DLL > ReportControl Object : FlipCROViewByAxis Method

Glossary Item Box

Description

Flips the CAD Reporting Object view along the axis passed.

Syntax

Visual Basic
Public Function FlipCROViewByAxis( _
   ByVal _axisToUse As Integer _
) As Long

Parameters

_axisToUse

Integer value of 0, 1, or 2:

0 - X axis

1 - Y axis

2 - Z axis

Return Type

Returns 1 if the flip succeeds and 0 otherwise.

Example

Flips the CRO view along an axis, based on user input.
Example (Visual Basic)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 ("CRO Found with ID: " & Control.id & " Type 0 to flip it along the X axis. Type 1 to flip it along the Y axis. Type 2 to flip it along the Z axis.","Flip CRO by Axis")
   Control.FlipCROViewByAxis intFlip
   RprtWindow.RefreshReport
  End If
  index = index+1
Wend
End Sub

See Also

Copyright © 2022. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.