Skip to main content
Version: v4.5

Add warranty

Adding warranty data to an element#

To add warranty data to an element, do the following:

  1. Fetch the elements you want to add warranty data to. For more information, see Fetching model elements.
  2. On the Model Elements pane, click the element you want to add warranty data to.
  3. On the Related Items pane, select the Warranty Data checkbox.
  4. On the Warranty Data pane, click ADD.
  5. Complete the following fields:
    • Warranty Description: Enter a description for the warranty information.
    • Warranty Start Date: Enter the warranty start date.
    • Warranty Duration: Enter the warranty end date.
  6. Click SAVE.

Figure: Add warranty data panes

Add Warranty Data

Code reference#

Add warranty data flow diagram#

The following diagram demonstrates the API calls used to create warranty data and link it to the relevant model elements:

Figure: Data flow diagram for adding warranty data to model elements

CalloutProcess
1During the project setup, IafItemSvc.createNamedUserItems() in setup.js creates a named user collection, Warranty Collection, to store warranty data.
2Create data objects for the warranty information, which contain the warranty date and commissioned date properties, with the option to add more data.
3IafItemSvc.createItemsBulk() creates related items of the warranty information data objects and adds them to the Warranty Collection.
4IafItemSvc.getItems() gets the model elements to assign warranty data to, for example, OST_Doors from the Revit collection.
5IafItemSvc.addRelationsBulk() creates relations between the fetched related items from the Revit collection and warranty related items by way of their object ids.

Warranty functions data flow#

createWarrantyAndElementRelation()#

The following graphic demonstrates the data model for the createWarrantyAndElementRelation() method in the setup.js file:

getElementsWarrantyData()#

The following graphic demonstrates the data model for the getElementsWarrantyData() method in the iaf_dt_model_elements.js file: