CopyToOptions class

Allows to specify additional options when copying project data.

public class CopyToOptions


Name Description
CopyToOptions() Initializes a new instance of the CopyToOptions class.


Name Description
CopyViewData { get; set; } Gets or sets a value indicating whether to copy view data while copying project data. Default value is true.


Shows how to use project copy options.

var project = new Project(DataDir + "CopyToProjectEmpty.xml");
File.Copy(DataDir + "CopyToProjectEmpty.mpp", OutDir + "ProjectCopying_out.mpp", true);

var mppProject = new Project(OutDir + "ProjectCopying_out.mpp");

// skip copying of view data while copying common project data.
var copyToOptions = new CopyToOptions();
copyToOptions.CopyViewData = false;
project.CopyTo(mppProject, copyToOptions);

See Also