Harness proD API Help
EPLAN.Harness.API.DataStructures.DisplayConfigurations Namespace / RibbonCableNbSetting Class / Hatch Property
Example
In This Topic
    Hatch Property (RibbonCableNbSetting)
    In This Topic
    Hatch pattern for organizers. The hatch is applied if HatchOverride is true. Pass a hatch pattern EPLAN.Harness.API.DataStructures.Appearance.HatchInfo or null to reset.
    Syntax
    public HatchInfo Hatch {get; set;}
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it.
    The object is in invalid state. Obtain a new one.
    Example
    The example shows how to set up a hatch pattern of the organizer.
    // Init API
    HpdApi api = HpdApi.GetInstance();
    
    // Open project.
    Project project = api.OpenProject(@"d:\MyProject.hxproj");
    
    // Get a default nailboard display configuration
    DisplayConfiguration dc = project.NailboardDisplayConfigurations.DefaultDisplayConfiguration;
    					
    // Hatches are included in the library. Get the library connection and select a pattern of the hatch by its name.
    ActiveLibraryConnection lc = project.ActiveConnection;
    HatchInfo hi = lc.GetHatches().FirstOrDefault(h => h.Name == "Loom");
    
    // Allow overriding of the hatch and set it up.
    dc.Bundle.HatchOverride = true;
    dc.Bundle.Hatch = hi;
    
    // Save and close the project.
    project.Save();
    project.Close();
    See Also