Table of Contents

Method SetActionOrthoMode

Namespace
vdWebLibrary
Assembly
JsPropertiesExtractor.dll

SetActionOrthoMode(bool)

Set the orthomode property of the actions that waiting for a user point referenced by an other one. If true Constrains cursor movement to the perpendicular.

public bool SetActionOrthoMode(bool mode)

Parameters

mode bool

Returns

bool

The previous selected ortho mode.

Examples

vdcanvas.SetActionOrthoMode(true);
vdcanvas.GetUserLine(_onActionGetDistanceStateChanged);

function _onActionGetDistanceStateChanged(action, status) {
    var vdcanvas = action.vdrawOwner();

    if (status == 'start') {
        vdcanvas.Prompt('pick first point');
    } else if (status == 'count') {
        vdcanvas.Prompt('pick second point');
    } else if (status == 'end') {
        vdcanvas.Prompt(':');
        if (!action.IsCanceled()) {
           var distance = vdgeo.Distance2D(action.ResValue[0], action.ResValue[1]);
           vdcanvas.Prompt('Distance = ' + distance.toString());
       }
    }
}