70000856 Support Group of objects

Article 70000856
Type Wish
Product WebJS
Version 7008
Date Added 9/5/2016
Fixed 7.7010.0.8 (2/3/2017)
Submitted by Samuel Howell

Summary

Could it be implemented into the web library a way to 'group' multiple primitives into one cohesive shape that selects and moves as one. Also potentially ungrouped?

Solution

In version 7010.0.8 document Groups collection of vdFrameControl is exported into vds file format

Example

We create three lines in the same group.Then we remove line2 from
the group and we now move the group with line1 and line3.


var line1 = vdcanvas.AddLine([0, 0, 0], [1, 1, 0],true);
vdcanvas.GroupsManager.AddItem("group1", line1);

var line2 = vdcanvas.AddLine([0, 0, 0], [1, 0, 0], true);
vdcanvas.GroupsManager.AddItem("group1", line2);

var line3 = vdcanvas.AddLine([0, 0, 0], [0, 1, 0], true);
vdcanvas.GroupsManager.AddItem("group1", line3);

vdcanvas.GroupsManager.RemoveItem("group1", line2);

vdcanvas.CmdMove();


You can see also in the help file

vdcanvas.GroupsManager.IgnoreGroups
vdcanvas.GroupsManager.EnableGroup
vdcanvas.GroupsManager.ClearGroup

Send comments on this topic.