Add a text to the document.
Syntax
Example
C# | Copy Code |
---|
vdrawobj.scriptCommand.textstyle('standard',2.0,'center','center');//select the active tetxtstyle , height , justification for the text object. vdrawobj.scriptCommand.text('VectorDraw'); // begins a user action to add a text with string value 'VectorDraw' |
C# | Copy Code |
---|
// draw a text using active textstyle, color , linetype,layer etc properties, with textstyle standard, height 2.0, justification center, display string 'VectorDraw', insertion point 2,2 and rotation angle 45 degrees //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.textstyle('standard',2.0,'center','center');//select the active tetxtstyle , height , justification for the text object. vdrawobj.scriptCommand.text('VectorDraw', [[2,2,0], vdgeo.DegreesToRadians(45)]); setTimeout(vdrawObj.redraw);//post a redraw command |
C# | Copy Code |
---|
// draw a text using active color , linetype,layer etc properties, with textstyle standard, height 2.0, justification center, display string 'VectorDraw', insertion point 2,2 and rotation angle 45 degrees //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 } vdrawobj.scriptCommand.textstyle('standard',2.0,'center','center');//select the active tetxtstyle , height , justification for the text object. vdrawobj.scriptCommand.text('VectorDraw', [[2,2,0], vdgeo.DegreesToRadians(45)] , actionentityadded); |
Remarks
See Also