EditLineSegmentBuilder Class

class NXOpen.Routing.EditLineSegmentBuilder

Bases: NXOpen.Builder

Builder for the “Edit Line Segment” operation.

Sets (and locks or unlocks) the length of NXOpen.Routing.LineSegment objects. Also moves geometry attached to the line segment to ensure that the attached geometry has the correct shape after an edit.

To create a new instance of this class, use NXOpen.Routing.RouteManager.CreateEditLineSegmentBuilder()

New in version NX6.0.0.

Properties

Property Description
ConvertEccentricSegment Returns or sets the conversion flag.
Length Returns the length expression.
LineSelection Returns the line selection.
LockLength Returns or sets the lock length flag.
ReverseDirection Returns or sets the reverse direction flag.
Tag Returns the Tag for this object.

Methods

Method Description
AddLineToSetOfAllEditedSegments Adds the current line segment to the set of all line segments that have been edited by the user.
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
DetachActiveRcp Detaches the line segment, stored in builder, at its active end RCP.
DragLineLength Updates the line length based on the expression stored in this builder.
GetActiveRcpPositon Determines the active RCP for the line selected by the user.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetObject Returns the object currently being edited by this builder.
GetOrientation Determines the orientation information for the line selected by the user.
InitializeFromLine Initializes (or resets) the builder based off of the input line segment.
ModifiedLineLength Updates the line length based on the expression stored in this builder.
RestartDrag Restart a line drag operation.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
StopDrag Stop the drag operation if it has begun.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Property Detail

ConvertEccentricSegment

EditLineSegmentBuilder.ConvertEccentricSegment

Returns or sets the conversion flag.

Forces the commit method to convert line segment to eccentric line segment if set to true. Otherwise convert it to vice versa

-------------------------------------

Getter Method

Signature ConvertEccentricSegment

Returns:
Return type:bool

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Setter Method

Signature ConvertEccentricSegment

Parameters:convertEccentricSegment (bool) –

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

Length

EditLineSegmentBuilder.Length

Returns the length expression.

This data from this expression is copied to (or from) the distance constraint applied to the ends of the line segment.

-------------------------------------

Getter Method

Signature Length

Returns:
Return type:NXOpen.Expression

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

LineSelection

EditLineSegmentBuilder.LineSelection

Returns the line selection.

Stores the line segment selected by the user.

-------------------------------------

Getter Method

Signature LineSelection

Returns:
Return type:NXOpen.Routing.SelectLineSegment

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

LockLength

EditLineSegmentBuilder.LockLength

Returns or sets the lock length flag.

Forces the commit method to lock the length to the specified value if set to true. Otherwise the length of the line segment is unconstrained after the commit method is invoked.

-------------------------------------

Getter Method

Signature LockLength

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Setter Method

Signature LockLength

Parameters:lockLength (bool) –

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

ReverseDirection

EditLineSegmentBuilder.ReverseDirection

Returns or sets the reverse direction flag.

Flips the direction that the extends towards (or shrinks along). This flips the origin of the line as well as the direction.

-------------------------------------

Getter Method

Signature ReverseDirection

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Setter Method

Signature ReverseDirection

Parameters:reverse (bool) –

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

Method Detail

AddLineToSetOfAllEditedSegments

EditLineSegmentBuilder.AddLineToSetOfAllEditedSegments

Adds the current line segment to the set of all line segments that have been edited by the user.

Signature AddLineToSetOfAllEditedSegments()

New in version NX9.0.2.

License requirements: routing_base (“Routing Basic”)

DetachActiveRcp

EditLineSegmentBuilder.DetachActiveRcp

Detaches the line segment, stored in builder, at its active end RCP.

By reversing the direction of line segment, user could make other end RCP as active RCP.

Signature DetachActiveRcp()

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

DragLineLength

EditLineSegmentBuilder.DragLineLength

Updates the line length based on the expression stored in this builder.

The line is not fully updated only partially updated (i.e. solid bodies build on the line do not update). This method assumes the difference between the new length value and the previous length value is very small (e.g. a drag operation).

Signature DragLineLength()

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

GetActiveRcpPositon

EditLineSegmentBuilder.GetActiveRcpPositon

Determines the active RCP for the line selected by the user.

This is end RCP other than the start point of line segment. This RCP could be dragged along the segment.

Signature GetActiveRcpPositon()

Returns:End point other

than the start point of line segment. :rtype: NXOpen.Point3d

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

GetOrientation

EditLineSegmentBuilder.GetOrientation

Determines the orientation information for the line selected by the user.

Returns false if there is no line currently stored in the builder.

Signature GetOrientation()

Returns:a tuple
Return type:A tuple consisting of (isValid, startPoint, direction). isValid is a bool. True if there is a line associated with this builder. startPoint is a NXOpen.Point3d. The start of the line. direction is a NXOpen.Vector3d. The direction of the line (unit vector).

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

InitializeFromLine

EditLineSegmentBuilder.InitializeFromLine

Initializes (or resets) the builder based off of the input line segment.

Signature InitializeFromLine(line)

Parameters:line (NXOpen.Routing.LineSegment) – Line object, may be None

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

ModifiedLineLength

EditLineSegmentBuilder.ModifiedLineLength

Updates the line length based on the expression stored in this builder.

The line is not fully updated only partially updated (i.e. solid bodies build on the line do not update). This method doesn’t assume anything about the new value. This method updates the line incrementally from the original length to the new length as this usually results in better looking geometry.

Signature ModifiedLineLength()

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

RestartDrag

EditLineSegmentBuilder.RestartDrag

Restart a line drag operation.

This routine should only be called if NXOpen.Routing.EditLineSegmentBuilder.StopDrag(). was previously called to stop a line drag operation.

Signature RestartDrag()

New in version NX7.5.1.

License requirements: routing_base (“Routing Basic”)

StopDrag

EditLineSegmentBuilder.StopDrag

Stop the drag operation if it has begun.

This will commit the drag and update the assembly. This will not remove the segment from the builder and dragging can be restarted by calling NXOpen.Routing.EditLineSegmentBuilder.RestartDrag().

Signature StopDrag()

New in version NX7.5.1.

License requirements: routing_base (“Routing Basic”)

Validate

EditLineSegmentBuilder.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.