Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Designer Class / PlaceSurfaceProtection Method / PlaceSurfaceProtection(LibSurfaceProtection,IOccBundle,ApiLinkType) Method
Surface protection from library.
Bundle where surface protection will be placed.
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.
Example
In This Topic
    PlaceSurfaceProtection(LibSurfaceProtection,IOccBundle,ApiLinkType) Method
    In This Topic
    Place surface protection on an existing bundle.
    Syntax

    Parameters

    part
    Surface protection from library.
    bundle
    Bundle where surface protection will be placed.
    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.

    Return Value

    Placed surface protection.
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from EPLAN.Harness.API.Studio.Status property. If API is uninitialized, you can initialize it by calling EPLAN.Harness.API.Studio.Init method. If API is in failed state, you can not resurrect it.
    The object is in invalid state. Obtain a new one.
    This operation was denied because of your license.
    The exception that is thrown when the part cannot be placed to workspace/workdesk.
    This file is not opened.
    Example
    This example shows how to place a new surface protection on the bundle.
    Workdesk workdesk = ...
    
    // Prepare Bundle.
    IOccBundle bundle = ...
    
    // Prepare LibSurfaceProtection.
    LibSurfaceProtection surfaceProtection = ...
    
    IOccSurfaceProtection surfaceProtectionOcc = workdesk.PlaceSurfaceProtection(surfaceProtection, bundle);
    See Also