Center Property (Read Only)

NI Vision for Visual Basic

Center Property (Read Only)

Syntax

CWIMAQAnnulus.Center

Data Type

CWIMAQPoint

Purpose

Center point of the annulus.

Example

Private Sub Run_Click()
    Dim Annulus1 As New CWIMAQAnnulus
    Dim Annulus2 As New CWIMAQAnnulus
    
    'Initialize the first annulus.
    Annulus1.Initialize 50, 50, 5, 40, 45, 315
    
    'Copy the properties from the first annulus into the second annulus.
    Annulus1.CopyTo Annulus2
    
    'Move the first annulus. The move does not affect the second annulus.
    Annulus1.Center.X = Annulus1.Center.X + 70
    Annulus1.Center.Y = Annulus1.Center.Y + 70
    
    'Add the annuluses to the viewer's regions collection.
    CWIMAQViewer1.Regions.AddAnnulus Annulus1
    CWIMAQViewer1.Regions.AddAnnulus Annulus2
End Sub