combit List & Label 30 - .NET Help
combit.Reporting.Dom Namespace / DomItem Class / CopyFrom Method
Example


CopyFrom Method (DomItem)
Copies all cloneable properties from one item to another. Make sure to call ResetInformation on the modified project in order to rebuild the object model afterwards.
Overload List
OverloadDescription
 
Example
ListLabel LL = new ListLabel();
ProjectList newProj = new ProjectList(LL);
newProj.Open(@"c:\users\public\copy.lst", LlDomFileMode.Create, LlDomAccessMode.ReadWrite);

ListLabel LL2 = new ListLabel();
ProjectList sourceProj = new ProjectList(LL2);
sourceProj.Open(@"c:\users\public\original.lst", LlDomFileMode.Open, LlDomAccessMode.ReadOnly);

newProj.CopyFrom(sourceProj);
newProj.ResetInformation();
newProj.Save();
newProj.Close();
sourceProj.Close();

LL2.Dispose();
LL.Dispose();
Requirements

Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
.NET: .NET Framework 4.8, .NET 6, .NET 8, .NET 9

See Also