Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Designer Class / PlaceMultipleSeal Method
The attached part which is placed.
Occurrence when the part is attached.
Determines if part's accessories will be placed with part. Mandatory, Optional, both types or None accessories can be placed. This enum has the Flags attribute. Default is mandatory accessories.
Example
In This Topic
    PlaceMultipleSeal Method
    In This Topic
    Place a multiple seal.
    Syntax

    Parameters

    part
    The attached part which is placed.
    parentOccurrence
    Occurrence when the part is attached.
    linkType
    Determines if part's accessories will be placed with part. Mandatory, Optional, both types or None accessories can be placed. This enum has the Flags attribute. Default is mandatory accessories.

    Return Value

    Placed occurrence.
    Exceptions
    ExceptionDescription
    This file is not opened.
    Api is not in an initialized state. You can get current state from EPLAN.Harness.API.HpdApi.Status property. If API is uninitialized, you can initialize it by calling EPLAN.Harness.API.HpdApi.Init 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 type of part can not be placed by the method or the part cannot be place to the occurrence.
    Thrown when placing this part failed.
    Example
    This example shows how to place a multiple seal part to a workspace.
    /// Obtain workspace beforehand and open for writing.
    Workspace workspace = ...
    workspace.Open(false, false);
    
    // Obtain part from active library
    IEnumerable<BaseLibraryPart> parts = project.ActiveConnection.GetLibraryPartsByPartNumber("multiple seal");
    BaseLibraryPart part = parts.FirstOrDefault();
    
    // Obtain occurrence from designer
    BaseOccurrence occurrence = workspace.GetAllOccurrences<OccWsWire>().FirstOrDefault(occ => occ.Name.ToString() == "wire1");
    
    // Place a attached part to occurrence
    workspace.PlaceMultipleSeal(part as LibMultipleSeal, occurence);
    See Also