API Documentation > CorelDRAW > 2025-v26 > EffectLens > IVGEffectLens
EffectLens.ViewPointX property
Gets or sets the X-value for the viewpoint
Syntax:
Property Get ViewPointX() As Double
Property Let ViewPointX(ByVal Value As Double)
Remarks:
The ViewPointX property returns or specifies the x-coordinate of a viewpoint in a lens.
Examples:
The following VBA example creates a magnified view of a certain region of the drawing.
Sub Test()
Dim sText As Shape, sLens As Shape
Set sText = ActiveLayer.CreateArtisticText(0, 0, "Some Text")
sText.Fill.UniformColor.RGBAssign 255, 0, 0
Set sLens = ActiveLayer.CreateEllipse2(1.5, 1.5, 0.7)
With sLens.CreateLens(cdrLensMagnify, 3).Lens
  .UseViewPoint = True
  .ViewPointX = 0.6
  .ViewPointY = 0.08
End With
ActiveLayer.CreateEllipse2 0.6, 0.08, 0.23
ActiveLayer.CreateLineSegment 0.74, -0.1, 2.02, 1.02
ActiveLayer.CreateLineSegment 0.39, 0.15, 0.85, 1.76 
End Sub