API Documentation > CorelDRAW > 2025-v26 > View > IVGView
View.OriginX property
Gets or sets the origin x of the view
Syntax:
Property Get OriginX() As Double
Property Let OriginX(ByVal Value As Double)
Remarks:
The OriginX property returns or specifies the value of the horizontal origin of a view.
Examples:
The following VBA example checks for views in the Views collection. If there is a view, it prints the horizontal origin of the view. If not, it adds a view and prints the horizontal origin.
Sub Test()
Dim Vw As View
Dim VwCollection As Views
Set VwCollection = ActiveDocument.Views
If VwCollection.Count > 0 Then
  Set Vw = VwCollection.Item(1)
  MsgBox "The horizontal origin of the active view is: " & Vw.OriginX
Else
  Set Vw = VwCollection.AddActiveView("TestView")
  MsgBox "The horizontal origin of the active view is: " & Vw.OriginX
End If
Set Vw = Nothing
Set VwCollection = Nothing 
End Sub