Nevron Open Vision Documentation
Nevron.Nov.Diagram Namespace / NPort Class / Relative Property


In This Topic
    Relative Property (NPort)
    In This Topic
    Gets or sets whether the port coordinates are expressed in absolute or relative values. By default set to false, meaning that port coordinates are in absolute shape coordinates.
    Syntax
    'Declaration
     
    
    Public Property Relative As System.Boolean
    'Usage
     
    
    Dim instance As NPort
    Dim value As System.Boolean
     
    instance.Relative = value
     
    value = instance.Relative
    public System.bool Relative {get; set;}
    Remarks
    It is often required to make ports the coordinates of which are expressed relatively to the shape Width and Height. In such cases you may set the Relative property to true.

    For example: if Relative is set to false, to define a port in the center of the shape you can set the "Width*0.5" and "Height*0.5" expressions to the X and Y coordindates of the port. This syntax requires one expressions per port coordinate.

    if Relative is set to true, to define a port in the center of the shape you can set the X property to 0.5 and the Y property to 0.5. This syntax does not require expressions.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also