70000334 I would like a multi cmdCopy command that will continue copying the selected items

Article 70000334
Type Wish
Product Engine
Version 7003
Date Added 2/24/2015
Fixed (3/18/2015)
Submitted by Alesio

Summary

I would like a multi cmdCopy command that will continue copying the selected items

Solution

In version 7004 we added a new command to the CommandAction as following

summary> Copies a selection of objects from one point to another.
param name="SelSet">A selection of vdFigures (see object) or "USER"/null so the user can pick entities from the screen.
param name="FromPoint">A base point object needed to copy the entities in User Coord. System (UCS) or "USER"/null so ther user can pick this point on screen.
param name="ToPoint">The point object where the entities will be copied to in User Coord. System (UCS) or a gPoints collection or "USER"/null so the user can pick this point on screen.
param name="Multicopy">A bool value that represents if the command will continue copying the selected entities until right click finishes the action.
returns>True if the command was succesfully performed.
public bool CmdCopy(object SelSet, object FromPoint, object ToPoint, bool Multicopy)

You can use this command as following

gPoints pts = new gPoints();
pts.Add(new gPoint(1,1));
pts.Add(new gPoint(2,2));
doc.CommandAction.CmdCopy (null,null,pts,true);

Or with all parameters null so the user selects everything on the screen. We changed our default CmdCopy from the menu to run as multicopy.

Send comments on this topic.