Interface AttributeInfoInterface

The AttributeInfoInterface gives information about the attributes of a part instance.

The DMU contains a collection of pieces (3D or not). All these pieces have information located inside them. The Attribute Info interface stores the type of the attribute, its name, the full "path of this attribute" (in case of nested attributes) and some range / min / max values if available.

Any AttributeInfoInterface with the type ATTR_STRING (getAttributeType), and with a limited number of available values is called enumerable.

Any enumerable attribute has a special use in the FilterAttributeInterface.

/** 
* Sample to illustrate the AttributesDictionaryInterface iteration.
*/
import { DataSessionInterface, AttributesDictionaryInterface, AttributeInfoInterface } from 'generated/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();
for (let i = 0; i < lAttr.length; ++i)
{
const lAttrName: string = lAttr[i].getAttributeName();
// output attribute name
console.log(lAttrName);
}

There may be cases when the results from an idcard request ([ObjectMetadataInterface](ObjectMetadataInterface.html) inside the [PartInstanceInfoInterface](PartInstanceInfoInterface.html)) are not of the expected type, such data cannot be requested since the field content is not indexed. In this case the attribute name is included in the [nonindexedpartmd](ObjectMetadataInterface.html#nonindexedpartmd), [nonindexedlinkmd](ObjectMetadataInterface.html#nonindexedlinkmd) or [nonindexedinstancemd](ObjectMetadataInterface.html#nonindexedinstancemd) fields, depending on the case.
Metadata

Hierarchy

  • AttributeInfoInterface

Methods

  • Gets the maximum value of the attribute in the database (only for number and date attributes, and if known) else returns undefined.

    Returns

    The maximum existing value for this attribute.

    Returns undefined | number

  • Gets the maximum value of the attribute inferred from its numeric type (byte, short, int, long long, float, double).

    Javascript only exposes numbers, but the 3djuump Infinite API exposes several numeric types. All numeric types have the type AttributeType.ATTR_NUMBER or AttributeType.ATTR_NUMBER_RANGE. It may be interesting to know the maximum value inferred by its type.

    Returns

    The maximum numeric value inferred by the type of this attribute.

    Returns number

  • Gets the minimum value of the attribute in the database (only for number and date attributes, and if known) else returns undefined.

    Returns

    The minimum existing value for this attribute.

    Returns undefined | number

  • Gets the minimum value of the attribute inferred from its numeric type (byte, short, int, long long, float, double).

    Javascript only exposes numbers, but the 3djuump Infinite API exposes several numeric types. All numeric types have the type AttributeType.ATTR_NUMBER or AttributeType.ATTR_NUMBER_RANGE. It may be interesting to know the minimum value inferred by its type.

    Returns

    The minimum numeric value inferred by the type of this attribute.

    Returns number

  • Gets the name of the attribute. This name is the one stored inside the database.

    Returns

    The name of the attribute in the database.

    Returns string

  • If this attribute is included in a sub-document (nested), gets the path of nested array in parent.

    All attributes that share the same nested path are included in the same nested document.

    Returns

    The nested path if the attribute is nested, undefined if not.

    Returns string

  • Gets the list of existing values for this attribute in the database.

    If the number of values exceeds the directory enumeration limit, then it returns undefined.

    Returns

    const
    The list of existing values in the database.

    Returns undefined | (string | number)[]

  • Tells if the attribute is enumerable.

    Any AttributeInfoInterface with the type ATTR_STRING (getAttributeType), and with a limited number of available values is called enumerable.

    Any enumerable attribute has a special use in the FilterAttributeInterface.

    Returns

    true if the attribute is enumerable.

    Returns boolean