Method GetUserPoint
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
GetUserPoint(onStateChangedDelegate)
Initiates an action (check BaseActionObj) where the user will select a point in the component's drawing area. The function is running asynchronously, so you need to implement statechangeDelegate event/delegate to manage the method results The action has the actionType == ACTION_POINT_WORLD
public void GetUserPoint(onStateChangedDelegate statechangeDelegate)
Parameters
statechangeDelegateonStateChangedDelegateA function created using the onStateChangedDelegate as model.
Examples
function _onActionPointIdStateChanged(action, status) {
var vdcanvas = action.vdrawOwner();
if (status == 'start') {
vdcanvas.Prompt('pick a point');
} else if (status == 'end') {
if (!action.IsCanceled()) {
vdcanvas.Prompt('X= ' + action.ResValue[X].toString() + ' Y= ' + action.ResValue[Y].toString());
} else {
vdcanvas.Prompt('');
}
}
}
function CmdPointId(canvasId) {
var vdcanvas = vdmanager.vdrawObject("canvasId");
vdcanvas.GetUserPoint(_onActionPointIdStateChanged);
}