Add a line to the document.
Syntax
Example
C# | Copy Code |
---|
vdrawobj.scriptCommand.line(); // begins a user action to draw a line |
C# | Copy Code |
---|
// draw a line using active color , linetype,layer etc properties, from 1,1 to 2,2 //after this command is finished the object is not drawn on screen. //You can call the vdrawObj.redraw after adding an amount of commands vdrawobj.scriptCommand.line([[1,1,0],[2,2,0]]); setTimeout(vdrawObj.redraw);//post a redraw command |
C# | Copy Code |
---|
// draw a line using active color , linetype,layer etc properties, from 1,1 to 2,2 //after this command is finished the object is not drawn on screen. //In order to display it call vdrawObj.DrawEntity and <see cref="M:vdWebLibrary.vdrawObj.Refresh"/> inside the user define callback .See example. function actionentityadded(vdraw, entity) { vdraw.DrawEntity(entity); setTimeout(vdraw.Refresh);//post a refresh command } vdcanvas.scriptCommand.line([[1, 1, 0], [2, 2, 0]], actionentityadded); vdcanvas.scriptCommand.line([[1, 1, 0], [3, 1, 0]], actionentityadded); |
Remarks
See Also