new TrackSegmentXY(element, follower, leader)
Creates a new tracking relationship between two junctions.
Parameters:
| Name | Type | Description |
|---|---|---|
element |
BIM.Element | The element the follower junction belongs to. |
follower |
BIM.Junction | The |
leader |
BIM.Junction | The |
Throws:
-
Throws an error if the follower or leader junctions are not valid.
- Type
- Error
Extends
Members
-
:number
distance
-
The distance from closest end of the segment.
Type
- number
-
:BIM.Element
hostElement
-
The element hosting the items in the relationship.
Type
- Inherited From:
- Overrides:
-
:BIM.Junction
hostJunction
-
The host junction that tracks the position of the leader.
Type
-
:boolean
isActive
-
Whether or not the relationship is active.
Type
- boolean
- Inherited From:
- Overrides:
-
:boolean
isRelation <readonly>
-
A flag identifying this object as a relationship.
Type
- boolean
- Inherited From:
- Overrides:
-
:boolean
isTrackSegmentXY <readonly>
-
A flag identifying this object as a TrackSegmentXY relationship.
Type
- boolean
-
:BIM.Junction
linkedJunction
-
The junction whose position is tracked on the space boundary.
Type
-
:number
type
-
The type of relationship.
Type
- number
- Inherited From:
- Overrides:
-
:number
u
-
Where in the segment the junction lies.
This is a fractional value between 0 and 1 based on the current length of the segment.
Type
- number
Methods
-
stillValid()
-
Checks that the relationship is still valid.
- Inherited From:
- Overrides:
Returns:
Returns true if the relationship is still valid.
- Type
- boolean
-
update(element [, junction])
-
Updates the relationship.
Any party to the relationship should be able to update the relationship by calling this method with itself as the argument.
Parameters:
Name Type Argument Description elementBIM.Element The element that is updating the relationship.
junctionBIM.Junction <optional>
The junction that is updating the relationship, if any - not used in this relationship.
- Inherited From:
- Overrides:
Returns:
Returns true if something changed and needs updating.
- Type
- boolean