Interface AttributesDictionaryInterface

The AttributesDictionaryInterface stores all the information of all the different attributes in the DMU.

The DMU contains a collection of pieces (3D or not). All these pieces have information located inside them. The Attribute Dictionary interface is used to query information of all the attributes available in the DMU.

/** 
* Sample to illustrate the AttributesDictionaryInterface iteration.
*/
import { DataSessionInterface, AttributesDictionaryInterface, AttributeInfoInterface } from 'generated_files/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;
// retrieve the attributes dictionary
const lAttributeDictionary: AttributesDictionaryInterface = lDataSession.getAttributesDictionary();
// get the dictionary to iterate over the attributes
const lAttr: Array<AttributeInfoInterface> = lAttributeDictionary.getDictionary();
let i : number;
for (i = 0; i < lAttr.length; i += 1)
{
const lAttrName: string = lAttr[i].getAttributeName();
// output attribute name
console.log(lAttrName);
}

The AttributesDictionaryInterface is available through the DataSessionInterface.getAttributesDictionary and DataSessionInterface.getAttributesDictionary functions.
Metadata

interface AttributesDictionaryInterface {
    getAttributeInfo(pAttributeName): AttributeInfoInterface;
    getDictionary(): AttributeInfoInterface[];
}

Methods

  • Gets the info of an attribute given its name, or undefined if such an attribute does not exist.

    Parameters

    • pAttributeName: string
      in
      The name of the attribute to fetch.

    Returns AttributeInfoInterface

    const
    The attribute info of the given attribute, or undefined if not found.