Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / ReportType Class
Members Example
In This Topic
    ReportType Class
    In This Topic
    Represents a type of a report.
    Inheritance Hierarchy

    System.Object
       EPLAN.Harness.API.Projects.Documents.ReportType

    Syntax
    public class ReportType 
    Example
    // 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();
    Public Properties
     NameDescription
    Public Property Localized name. Better readable for humans, but might change.  
    Public Property Internal name of the type. Does not change with localization. Usable for filtering.  
    Top
    Public Methods
     NameDescription
    Public MethodReturns a string that represents the current object.  
    Top
    See Also