Réserver une Démo

SVP notez : Cette page d’aide n’est pas pour la dernière version d’Enterprise Architect. La dernière aide peut être trouvée ici.

Pré. Proc.

RoleTag Class

The RoleTag interface provides access to an Association's Role Tagged Values. Each connector end has a RoleTag collection that can be accessed to add, delete and access the RoleTags.
You might use this in creating code that resembles this fragment for accessing a RoleTag in VB.NET (where con is a Connector Object):
client = con.ClientEnd
client.Role = "m_client"
client.Update()
tag = client.TaggedValues.AddNew("tag", "value")
tag.Update()
tag = client.TaggedValues.AddNew("tag2", "value2")
tag.Update()
client.TaggedValues.Refresh()
For idx = 0 To client.TaggedValues.Count - 1
tag = client.TaggedValues.GetAt(idx)
Console.WriteLine(tag.Tag)
client.TaggedValues.DeleteAt(idx, False)
Next
tag = Nothing

Associated table in repository

t_taggedvalue

RoleTag Attributes

Attribute

Description

See also

BaseClass

String
Notes: Read/Write
Indicates the role end; set to ASSOCIATION_SOURCE or ASSOCIATION_TARGET.

ElementGUID

String
Notes: Read/Write
The GUID of the connector with which this role tag is associated.

FQName

String
Notes: Read only
The fully qualified name of the tag.

ObjectType

ObjectType
Notes: Read only
Distinguishes objects referenced through a Dispatch interface.
ObjectType

PropertyGUID

String
Notes: Read/Write
A system generated GUID to identify the Tagged Value.

Tag

String
Notes: Read/Write
The actual tag name.

Value

String
Notes: Read/Write
The value associated with this tag.

RoleTag Methods

Method

Description

See also

GetAttribute(string propName)

String
Notes: Returns the text of a single named property within a Structured Tagged Value.

GetLastError()

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

HasAttributes()

Boolean
Notes: Returns True if the Tagged Value is a Structured Tagged Value with one or more properties.

SetAttribute(string propName, string propValue)

Boolean
Notes: Sets the text of a single named property within a Structured Tagged Value.

Update()

Boolean
Notes: Update the RoleTag after changes or on initial creation.
If False is returned, check the 'GetLastError()' function for more information.