System.Object
EPLAN.Harness.API.Projects.Documents.ReportType
System.Object
EPLAN.Harness.API.Projects.Documents.ReportType
public class ReportType
// Make list of all harnesses. // You can use both harnesses and cable units for report derivation. Its common base is DerivationSource class. List<DerivationSource> sources = variant.GetAllWireHarnessInfos().Cast<DerivationSource>().ToList(); // You could add all cable units as well. // sources.AddRange(variant.GetAllCableUnitInfos().Cast<DerivationSource>()); // Select an Aggregated BOM report type. // We use "Name" property, because it does not depend on localization. "LocalizedName" does. // To see see all the report type names, list all report types using Report.GetReportTypes(). ReportType reportType = Report.GetReportTypes().Where(n => n.Name == "AggregatedBOMReporter").FirstOrDefault(); // Create a new Aggregated BOM report from all harnesses in a variant. Report report = variant.CreateReport("My new report name", sources, reportType); // Save the project so the new report is saved into the project structure. project.Save();
Name | Description | |
---|---|---|
LocalizedName | Localized name. Better readable for humans, but might change. | |
Name | Internal name of the type. Does not change with localization. Usable for filtering. |