%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
Fig_codeToString Method
See Also  Example
vdWebLibrary Namespace > vdrawObj Class : Fig_codeToString Method
code
The code of the vdFigure.

Returns the corresponding vdFigure's name of the code passed.The supported values are:

vdLine,vdPolyline,vdText,vdRect,vdCircle,vdEllipse,vdArc,vdImage,vdInsert,vd3DFace,vdPolyface,

vdAttrib,vdAttribDef,vdInfinityLine,vdPoint,vdViewport,vdPolyhatch,vdDimension,vdMText,vdMultiline,

vdGroundSurface,vdLeader,vdArcAlignedText.

Syntax

JScript 
public function Fig_codeToString( 
   code : int
) : String;

Parameters

code
The code of the vdFigure.

Return Value

The string of the vdFigure's name.

Example

C#Copy Code
function _vdmousedown(e) { 
    document.getElementById("display").focus(); 
      var entity = e.target.GetEntityFromPoint(e.xPix, e.yPix); 
      if (entity != null && entity._t != undefined) { 
          info2.innerHTML = "Item Clicked Type : " + e.target.Fig_codeToString(entity._t) + ", Handle : " + entity.HandleId.toString(); 
    } 
}

See Also