Harness proD API Help
EPLAN.Harness.API.Common Namespace / Extensions Class / AddToWireHarness Method
EPLAN.Harness.API.Occurrences.Interfaces.IWireHarnessAddable occurrence.
Wire harness to which you want to add this occurrence.
Example
In This Topic
    AddToWireHarness Method (Extensions)
    In This Topic
    Add this occurrence to the wire harness.
    Syntax
    [Extension()]
    public static void AddToWireHarness( 
       IWireHarnessAddable occ,
       IOccWireHarness wireHarness
    )

    Parameters

    occ
    EPLAN.Harness.API.Occurrences.Interfaces.IWireHarnessAddable occurrence.
    wireHarness
    Wire harness to which you want to add this occurrence.
    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.
    Thrown when the occurrence and wire harness are not part of the same document.
    Example
    This example shows how to add an occurrence to a wire harness.
    IOccWireHarnessAddable occurrence = ...
    IOccWireHarness wireHarness = ...
    
    occurrence.AddToWireHarness(wireHarness);
    See Also