%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
ChangeOrder Method
See Also  Example
vdWebLibrary Namespace > vdrawObj Class : ChangeOrder Method
entity
The object to be placed.
ToBack
If this value is true then the object will be placed to the beginning of the list else it will be placed to the end.
collection
Optional.If not set, the GetActiveLayout.Entities is used.
Places an existing object of the collection to the beginning or the end of the passed collection.

Syntax

JScript 
public function ChangeOrder( 
   entity : Object,
   ToBack : boolean,
   collection : Object
) : boolean;

Parameters

entity
The object to be placed.
ToBack
If this value is true then the object will be placed to the beginning of the list else it will be placed to the end.
collection
Optional.If not set, the GetActiveLayout.Entities is used.

Example

We create a line using AddLine method wich returns an objoct and not scriotCommand.line which does not and then using ChangeOrder method we place it in the back.We do not set the collection,so the collection will contain all of the entities of the active layout.
C#Copy Code
line = vdcanvas.AddLine([-5, -2, 0], [5, 2, 0]); 
vdcanvas.ChangeOrder(line, false);

See Also