Class: Relation

BIM. Relation

Defines a base relationship between two entities.

Relations allow changes made to one entity to automatically affect another. For example, the positions of two vertices can be linked so that changing one automatically updates the other.


new Relation(type, element)

Creates a new base relationship.

Parameters:
Name Type Description
type BIM.RELATION

The type of relationship.

element BIM.Element

The element that hosts the relationship.

Author:
  • drajmarsh

Classes

KeepSpatialPositionXY
SubSurfaces
SurfaceMounted
TrackCollinear
TrackSegmentXY

Members


:BIM.Element

hostElement

The element hosting the items in the relationship.

Type

:boolean

isActive

Whether or not the relationship is active.

Type
  • boolean

:boolean

isRelation <readonly>

A flag identifying this object as a relationship.

Type
  • boolean

:number

type

The type of relationship.

Type
  • number

Methods


stillValid()

Checks that the relationship is still valid.

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
element BIM.Element

The element that is updating the relationship.

junction BIM.Junction <optional>

The junction that is updating the relationship, if any.

Returns:

Returns true if something changed and needs updating.

Type
boolean