70001172 Get a clone of an entity

Article 70001172
Type Wish
Product WebJS
Version 7011
Date Added 9/26/2017
Fixed 7.7012.0.7 (9/26/2017)
Submitted by VectorDraw Team

Summary

A method to get a copy of an entity object.

Solution

In version 7012.0.7 a new method cloneEntity of vdConst was added.

example get a clone of the last entity of the ActiveLayout

var len = vdcanvas.GetActiveLayout().Entities.length;
var clone = vdConst.cloneEntity( vdcanvas.GetActiveLayout().Entities[len-1]);

NOTE the new created entity does not belong to any collection nor to active layout entities.It is just a temporary object

Send comments on this topic.