Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Designer Class / PlaceTwist Method
List of positions in space or occurrences to which the twist will be connected. The order of items matters!
Outside diameter of the twist. 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
    PlaceTwist Method
    In This Topic
    Place a twist to this designer.
    Syntax

    Parameters

    positions
    List of positions in space or occurrences to which the twist will be connected. The order of items matters!
    outsideDiameter
    Outside diameter of the twist. 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 twist.
    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 twist:
    Example
    This example shows how to place a new twist to any positions in the space.
    Workdesk workdesk = ...
    
    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))));
    
    workdesk.PlaceTwist(placePositions);
    This example shows how to place a new twist with defined diameter and bending radius.
    Designer designer = ...
    
    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))));
    
    IOccTwist twist = designer.PlaceTwist(placePositions, new LengthProperty(15, Unit.Millimeter), new LengthProperty(18, Unit.Millimeter));
    This example shows how to start the new twist from a control point of another twist.
    Workdesk workdesk = ...
    OccWdTwist twist = ...
    
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(twist.GetAllControlPoints().First()));
    placePositions.Add(new PlacePosition(new TransformProperty<LengthProperty>(new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter), new LengthProperty(0, Unit.Millimeter))));
    
    workdesk.PlaceTwist(placePositions);
    This example shows how to connect a twist with any leading parts.
    Workdesk workdesk = ...
    OccWdLeadingPartEndPoint leadingPartEndPoint = ...
    OccWdClipPoint clipPoint = ...
    OccWdLeadingPartEndPoint grommetEndPoint = ...
    
    List<PlacePosition> placePositions = new List<PlacePosition>();
    placePositions.Add(new PlacePosition(leadingPartEndPoint));
    placePositions.Add(new PlacePosition(clipPoint));
    placePositions.Add(new PlacePosition(grommetEndPoint));
    
    workdesk.PlaceTwist(placePositions);
    See Also