Réserver une Démo
Pré. Proc.

Attribute Class

An attribute corresponds to a UML Attribute. It contains further collections for constraints and Tagged Values. Attributes are accessed from the element Attributes collection.

Associated table in repository

t_attribute

Attribute Attributes

Attribute

Remarks

See also

Alias

String

Notes: Read/Write

Contains the (optional) 'Alias' property for this attribute. This can be used interchangeably with the Style attribute.

AllowDuplicates

Boolean

Notes: Read/Write

Indicates if duplicates are allowed in the collection.

If the attribute represents a database column this, when set, represents the 'Not Null' option.

AttributeGUID

String

Notes: Read only

A globally unique ID for the current attribute. This attribute is system generated.

AttributeID

Long

Notes: Read only

The local ID number of the attribute.

ClassifierID

Long

Notes: Read/Write

The classifier ID, if appropriate, indicating the base type associated with the attribute, if not a primitive type.

Constraints

Collection

Notes: Read only

A collection of AttributeConstraint objects, used to access and manage constraints associated with this attribute.

Collection Class

Container

String

Notes: Read/Write

The container type.

Containment

String

Notes: Read/Write

The type of containment - Not Specified, By Reference or By Value.

Default

String

Notes: Read/Write

The initial value assigned to this attribute.

FQStereotype

String

Notes: Read Only

The fully-qualified stereotype name in the format "Profile::Stereotype". One or more fully-qualified stereotype names can be assigned to StereotypeEx.

IsCollection

Boolean

Notes: Read/Write

Indicates if the current feature is a collection or not. If the attribute represents a database column this, when set, represents a Foreign Key.

IsConst

Boolean

Notes: Read/Write

A flag indicating if the attribute is Const or not.

IsDerived

Boolean

Notes: Read/Write

Indicates if the attribute is derived (that is, a calculated value).

IsID

Boolean

Notes: Read/Write

Indicates if the attribute uniquely identifies an instance of the containing Class, or not.

IsOrdered

Boolean

Notes: Read/Write

Indicates if a collection is ordered or not. If the attribute represents a database column this, when set, represents a Primary Key.

IsStatic

Boolean

Notes: Read/Write

Indicates if the current attribute is a static feature or not. If the attribute represents a database column this, when set, represents the 'Unique' option.

Length

String

Notes: Read/Write

The attribute length, where applicable.

LowerBound

String

Notes: Read/Write

A value for the collection lower boundary.

Name

String

Notes: Read/Write

The attribute name.

Notes

String

Notes: Read/Write

Further notes on this attribute.

ObjectType

ObjectType

Notes: Read only

Distinguishes objects referenced through a Dispatch interface.

ObjectType

ParentID

Long

Notes: Read only

Returns the ElementID of the element that this attribute is a part of.

Pos

Long

Notes: Read/Write

The position of the attribute in the Class attribute list.

Precision

String

Notes: Read/Write

The precision value.

RedefinedProperty

String

Notes: Read/Write

Corresponds to the 'Redefined Property' field on the 'Detail' page of the attribute 'Properties' dialog, or the UML redefinedProperty attribute.

Contains a comma separated list of GUIDs.

Scale

String

Notes: Read/Write

The scale value.

Stereotype

String

Notes: Read/Write

Sets or gets the stereotype for this attribute.

When setting this attribute, LastError (for the GetLastError method) will be non-empty if an error occurs.

StereotypeEx

String

Notes: Read/Write

Provides all the applied stereotypes of the attribute, in a comma-separated list. Reading the value will provide the stereotype name only; assigning the value accepts either fully-qualified or simple names.

When setting this attribute, LastError (for the GetLastError method) will be non-empty if an error occurs.

Style

String

Notes: Read/Write

Contains the (optional) Alias property for this attribute. This can be used interchangeably with the Alias attribute.

StyleEx

String

Notes: Read/Write

Advanced style settings, reserved for the use of Sparx Systems.

SubsettedProperty

String

Notes: Read/Write

Corresponds to the 'Subsetted Property' field on the 'Detail' page of the attribute 'Properties' dialog, or the UML subsettedProperty attribute.

Contains a comma separated list of GUIDs.

TaggedValues

Collection of type AttributeTag

Notes: Read only

A collection of AttributeTag objects, used to access and manage Tagged Values associated with this attribute.

AttributeTag Class Collection Class

TaggedValuesEx

Collection of type TaggedValue

Notes: Read only

A collection of TaggedValue objects belonging to the current attribute and the TaggedValuesEx property of its classifier.

TaggedValue Class Collection Class

Type

String

Notes: Read/Write

The attribute type (by name; also see ClassifierID).

TypeInfoProperties

Notes: Read only

Returns an interface pointer of TypeInfoProperties.

TypeInfoProperties Class

UpperBound

String

Notes: Read/Write

A value for the collection upper boundary.

Visibility

String

Notes: Read/Write

Identifies the scope of the attribute - Private, Protected, Public or Package.

Attribute Methods

Method

Remarks

See also

GetLastError()

String

Notes: Returns a string value describing the most recent error that occurred in relation to this object.

GetTXAlias (string Code, long Flag)

String

Notes: Returns the Alias of the element for a given language.

Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Flag: Long
         -  0 = Get the currently-stored translated Alias
         -  1 = Get the currently-stored translated Alias, and auto translate if the original Alias has changed
         -  2 = Always fetch the translated Alias from online
Translate Page

GetTXName (string Code, long Flag)

String

Notes: Returns the name of the element for a given language.

Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Flag: Long
         -  0 = Get the currently-stored translated name
         -  1 = Get the currently-stored translated name, and auto translate if the original name has changed
         -  2 = Always fetch the translated name from online
Translate Page

GetTXNote (string Code, long Flag)

String

Returns the Notes of the element for a given language.

Parameters

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Flag: Long
        -  0 = Get the currently-stored translated Notes
        -  1 = Get the currently-stored translated Notes, and auto translate if the original Notes have changed
        -  2 = Always fetch the translated Notes from online
Translate Page

SetTXAlias (string Code, string Translation)

String

Notes - Set the translated Alias of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Translation: String - The translated Alias
Translate Page

SetTXName (string Code, string Translation)

String

Notes - Set the translated name of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Translation: String - The translated name
Translate Page

SetTXNote (string Code, string Translation)

String

Notes - Set the translated Notes of the element for a given language.

  • Code: String - Two-letter language code (found on the 'Translations' page of the 'Manage Model Options' dialog)
  • Translation: String - The translated Notes
Translate Page

Update()

Boolean

Notes: Updates the current attribute object after modifying or appending a new item.

If False is returned, check the 'GetLastError()' function for more information.