Attribute of some building block types. Values of the specified type can be assigned to instances of those building block types.

remarks

Returned by MetamodelApi.getAttribute, MetamodelApi.getAttributes and MetamodelApi.getAttributesAssignedToBuildingBlockType

Hierarchy

  • Attribute

Index

Properties

attributeGroup

attributeGroup: string

Attribute group to which the attribute is assigned

buildingBlocks

buildingBlocks: BuildingBlockType[]

Persistent names of the building block types to which instances a value of this attribute can be assigned

description

description: string

Optional includeAllUsers

includeAllUsers: boolean

Whether all user can possibly be assigned

remarks

Only available for responsibility attributes

lastModificationTime

lastModificationTime: string

Time at which the attribute was last modified

This will have format "{{Day of week}} {{Month}} {{Day of Month}} {{Year}} {{Hour}}:{{Minute}}:{{Second}} {{Timezone}}" So for example "Tue Mar 24 2020 12:51:02 GMT+0100 (CET)"

lastModificationUser

lastModificationUser: string

User who last modified the attribute

This will have the format "{{FIRST NAME}} {{LAST NAME}} ({{USERNAME}})" (so for example "Joe Smith (joe)")

example
// Gets the user information from the "lastModificationUser" string
var userString = changedObject.getValue('lastModificationUser');
var loginName = userString.substring(userString.indexOf("(")+1, userString .length-1);
var lastModificationUser = api.user.get(loginName);

Optional literals

Literals (possible values) of this enumeration/responsibility attribute

remarks

Only available for enumeration/responsibility attributes

mandatory

mandatory: boolean

Whether building blocks with this attribute have to have a value assigned to this attribute.

Optional multiassignmenttype

multiassignmenttype: boolean

Whether this attribute can hold multiple values at once

remarks

Only available for responsibility/enumeration attributes

name

name: string

type

Optional users

deprecated

use literals instead Users and user groups which have a corresponding literal for this responsibility attribute

remarks

Only available for responsibility attributes

Methods

Optional createEnumerationLiteral

  • createEnumerationLiteral(name: string, description: string, color: string): boolean
  • Create literal for an existing enumeration attribute

    remarks

    Only available for enumeration attributes

    Parameters

    • name: string

      Name of the enumeration literal

    • description: string

      Description for the enumeration literal

    • color: string

      Color to associate with the enumeration literal

    Returns boolean

Optional createResponsibilityLiteral

  • createResponsibilityLiteral(userEntityId: number, color: number): boolean
  • Create literal for an existing responsibility attribute

    remarks

    Only available for responsibility attributes

    Parameters

    • userEntityId: number

      Id of the user or user group to which the literal should refer to

    • color: number

      Color to associate with the responsibility literal

    Returns boolean

Optional removeEnumerationLiteral

  • removeEnumerationLiteral(name: string): boolean
  • Remove literal for an existing enumeration attribute

    remarks

    Only available for enumeration attributes

    Parameters

    • name: string

      Name of the enumeration literal

    Returns boolean

Optional removeResponsibilityLiteral

  • removeResponsibilityLiteral(userEntityId: number): boolean
  • Remove literal for an existing responsibility attribute

    remarks

    Only available for responsibility attributes

    Parameters

    • userEntityId: number

      Id of the user or user group to which the literal refers to

    Returns boolean

Legend

Generated using TypeDoc