%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
parseCommands Method
See Also 
vdWebLibrary Namespace > ScriptCommands Class : parseCommands Method
commands
And array of script command.If it is undefined the getCommands buffer is used.
Parse the passed command buffer. If the passed commands are undefined the it parses the active script command buffer getCommands

Syntax

JScript 
public function parseCommands( 
   commands : String[]
);

Parameters

commands
And array of script command.If it is undefined the getCommands buffer is used.

Remarks

Following commands are supported All passed parameters are in string for passing a color colorToString Angles are in degrees use doublevalue.toString() Points are strings separate x,y,z by comma',': example 1,2,3

1. <b> layer </b> name set the layer with specific name as active.All new created entities that follow this command will reference that layer.

2. <b> color </b> colorStringValue set the color with specific colorStringValue as active.All new created entities that follow this command will have that color.

3. <b> linetype </b> name set the linetype with specific name as active.All new created entities that follow this command will reference that linetype.

4. <b> lineweight </b> weight set the passed weight as active.All new created entities that follow this command will have that lineweight.

5. <b> ltscale </b> scale set the passed scale as active linetype scale.All new created entities that follow this command will have that linetypescale.

6. <b> penwidth </b> width set the passed width as active.All new created entities that follow this command will have that penwidth.

7. <b> thickness </b> newvalue set the passed newvalue as active thickness.All new created entities that follow this command will have that thickness.

8. <b> tooltip </b> tipstring set the passed tipstring as active tooltip.All new created entities that follow this command will have that tooltip.

9. <b> textstyle </b> name height horjust verjust set the textstyle with specific name as active.All new created entities that follow this command will reference that textstyle. height specifies the text height for new text objects horjust specifies the horizontal justification for new text objects and can be one of the value 'left' 'right' 'center' verjust specifies the vertical justification for new text objects and can be one of the value 'top' 'bottom' 'center' 'base'

10. <b> hatch </b> HatchPatternName FillBkColorString FillColorString hatchscale hatchangle(in dec degrees) transparency (0-255) Set the active hatch properties to be used for new filled created objects.

11. <b> layout </b> name Set the passed layout name as active.All new entities after this command will be added to that Layout Entities collection.

12. <b> line </b> startpoint endpoint Create a new line using active properties and the passed start and end points The passed point must as string values for example: line 2,3,4 5,6,7 :create a line from 2,3,4 to 5,6,7

13. <b> polyline </b> vertexlist Create a new polyline using active properties and the passed vertexlist as string value. example 'polyline 2,3,4 5,6,7 8,9,10 : create a new polyline with 3 vertexes from 2,3,4 to 4,5,6 to 8,9,10

14. <b> spline1 </b> vertexlist Create a new polyline with SplineFlag = SplineFlagFITTING using active properties and the passed vertexlist as string value.

15. <b> spline2 </b> vertexlist Create a new polyline with SplineFlag = SplineFlagCONTROLPOINTS using active properties and the passed vertexlist as string value.

16. <b> spline4 </b> vertexlist Create a new polyline with SplineFlag = SplineFlagQUADRATIC using active properties and the passed vertexlist as string value.

17. <b> rect </b> insertionPoint(in world), width(in drawing units), height(in drawing units), rotation(in degrees) Create a new rect using active properties and the passed properties.

18. <b> circle </b> centerPoint radius Create a new circle using active properties and the passed properties.

19. <b> arc </b> centerPoint radius startAngle(in degrees) endAngle(indegrees) Create a new arc using active properties and the passed properties.

20. <b> ellipse </b> centerPoint majorLength MinorLength startAngle(in degrees) endAngle(in degrees) Create a new ellipse using active properties and the passed properties.

21. <b> text </b> textValue insertionPoint rotation(in degrees) Create a new text using active properties and the passed properties.

22. <b> image </b> imagereferenceName urlpath insertionPoint imageSize rotation(in degrees) Create a new image using active properties and the passed properties. imagereferenceName must be a Name from an existing image in the doucument images for all image references in the document or a new table Name that will be used for the passed urlpath

23. <b> blockref </b> blockSymbolName insertionPoint scale rotation(in degrees) Create a new block reference(insert) using active properties and the passed properties. blockSymbolName must be a Name from an existing block in the doucument Blocks for all block references in the document

24. <b> select </b> parameter Select entities according to the passed parameter and add them to the active selection. , ActiveSelection erase,move , rotate, scale and copy parse commands will apply to the active selection. parameter can be one of the following: 'all' : select all the entities of the active layout '-all' : remove all the entities from the active selection. 'last' : add the last entity of the active layout entities collection to the active selection. 'h_XXX' : add the entity with a specific HandleId (XXX) to the active collection 'w_conrenerPoint1_corenrPoint2' : add all entities completely included to the past window conrenerPoint1 and corenrPoint2 are point as string example: w_1,1,0_2,2,0 'c_conrenerPoint1_corenrPoint2' : add all entities completely included or intersects the past window conrenerPoint1 and corenrPoint2 are point as string example: c_1,1,0_2,2,0

25. <b> erase </b> Erase all the entities in the active selection previous selected by 'select' command After this action the active selection is cleared.

26. <b> move </b> fromPoint toPoint Move all the entities in the active selection previous selected by 'select' command

27. <b> rotate </b> referencePoint rotationAngle(in degrees) Rotate all the entities in the active selection previous selected by 'select' command

28. <b> scale </b> referencePoint scaleFactor Scale all the entities in the active selection previous selected by 'select' command

29. <b> copy </b> fromPoint toPoint Copy all the entities in the active selection previous selected by 'select' command

30. <b> dimvar </b> variablename value Set dimension style properties used to draw a dimension executed be command

31. <b> dim </b> dimlinePoint1 dimlinePoint2 dimLocation dimtext Add a dimension block to the document according the the active dimension style properties

32. <b> doublelinewidth </b> newvalue set the passed newvalue as active width for double line draw.

33. <b> doubleline </b> vertexlist Create a new double line polyline using active properties and the passed vertexlist as string value.

34. <b> doublelinerect </b> insertionPoint(in world), width(in drawing units), height(in drawing units), rotation(in degrees) Create a new double line rect using active properties and the passed properties.

See Also