Shape(s) pasted from clipboard do (not) become members in active l

G

Guy..L

If one shape is copied and pasted, it becomes a member of the active layer.

If a group of shapes is copied and pasted, they do not become a member of
the active layer.

Why is this?

Here's the cut and paste with a hack included to handle the groups. I've
extended the Layer class with .Activate

opage = doc.Pages.Add();
opage.Name = "Run";
Layer order = opage.Layers.Add("job");

// copy over all selected shapes
Job.Copy(VisCutCopyPasteCodes.visCopyPasteNormal);
order.Activate(true);

opage.Paste(VisCutCopyPasteCodes.visCopyPasteNormal);

// hack because Job for groups doesn't end up in the layer just
activated
Job = opage.CreateSelection(VisSelectionTypes.visSelTypeAll,0,0);
foreach (Shape n in Job)
{
order.Add(n, 1);
}
order.Activate(false);
 
P

Paul Herber

If one shape is copied and pasted, it becomes a member of the active layer.

If a group of shapes is copied and pasted, they do not become a member of
the active layer.

The group itself seems to get added to the layer, hence, the
individual members of the group don't need to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top