Autodesk Creative Platform Core Version 1.19.0
A broad and deep collection of 2D and 3D capabilities.

RefSet Overview

It's a set to store the object references and provides the item added / removed event for client to subscribe.

Introduced in Version: 1.10.0

Class Member Summary

Class Member Details

RefSet add (ref) | Chainable

Adds the reference to the set and fires the itemAdded event
  • ref: Object - the object to add

RefSet clear() | Chainable

Clears all refs and fires the itemRemoved event for each removed ref

EventSource itemAdded

Event will be fired when an item is added.

EventSource itemRemoved

Event will be fired when an item is removed.

Boolean remove (ref)

Removes the reference from the set and fires the itemRemoved event. It returns a Boolean value to indicate if the removal succeeds
  • ref: Object - the object to remove

Number size()

Returns the number of reference in the set

Array toArray()

Returns an array containing all the reference objects