Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Designer Class / PlaceBundle Method
List of positions in space or occurrences to which the bundle will be connected. The order of positions matters!
Outside diameter of the bundle. If not filled, the default value from settings is used.
Bending radius of the bundle. This property has meaning only for EPLAN.Harness.API.Common.Enums.ApiPathInterpolationAlgorithm.RoundedCorners. If not filled, the default value from settings is used.
Example
In This Topic
    PlaceBundle Method
    In This Topic
    Place bundle to this designer.
    Syntax

    Parameters

    positions
    List of positions in space or occurrences to which the bundle will be connected. The order of positions matters!
    outsideDiameter
    Outside diameter of the bundle. If not filled, the default value from settings is used.
    bendingRadius
    Bending radius of the bundle. This property has meaning only for EPLAN.Harness.API.Common.Enums.ApiPathInterpolationAlgorithm.RoundedCorners. If not filled, the default value from settings is used.

    Return Value

    Placed bundle.
    Exceptions
    ExceptionDescription
    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.
    This operation was denied because of your license.
    This file is not opened.
    Remarks
    Conditions of placing the bundle:
    Example
    This example shows how to place a new bundle to any positions in the space.
    // Get the workdesk where bundle will be placed.
    Workdesk workdesk = ...
    
    // Create the list of bundle positions and add at least two positions to it.
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(100, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    
    // Place the bundle with specified positions, default diameter and bending radius.
    workdesk.PlaceBundle(placePositions);
    This example shows how to place a new bundle with defined diameter and bending radius.
    // Get the workspace where bundle will be placed.
    Workspace workspace = ...
    
    // Create the list of bundle positions and add at least two positions to it.
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(-50, Unit.Millimeter), new LengthProperty(10, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    
    // Place the bundle with specified positions, diameter and bending radius.
    workspace.PlaceBundle(placePositions, new LengthProperty(15, Unit.Millimeter), new LengthProperty(18, Unit.Millimeter));
    This example shows how to start the new bundle from a control point of another bundle.
    // Get the designer where bundle will be placed.
    Designer designer = ...
    
    // Get the bundle which will share the starting point with our new bundle.
    IOccBundle bundle = ...
    
    // Create the list of bundle positions. Add the first point of bundle above and a second point.
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(bundle.GetAllControlPoints().First()));
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    
    // Place the bundle with specified positions, default diameter and bending radius.
    designer.PlaceBundle(placePositions);
    This example shows how to connect a bundle with any leading parts.
    // Get the workdesk where bundle will be placed.
    Workdesk workdesk = ...
    
    // Get leading parts where the bundle will path.
    OccWdLeadingPartEndPoint leadingPartEndPoint = ...
    OccWdClipPoint clipPoint = ...
    OccWdLeadingPartEndPoint grommetEndPoint = ...
    
    // Create the list of bundle positions and add positions of leading parts.
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(leadingPartEndPoint));
    placePositions.Add(new PlacePosition(clipPoint));
    placePositions.Add(new PlacePosition(grommetEndPoint));
    
    // Place the bundle with specified positions, default diameter and bending radius.
    workdesk.PlaceBundle(placePositions);
    See Also