前页 | 后页 |
Reference Class
This Interface provides access to the various lookup tables within Enterprise Architect. Use the Repository GetReferenceList() method to get a handle to a list.GetReferenceList (string Type)
Notes: Uses the list type to get a pointer to a Reference List object.
Parameters:
Type: String - specifies the list type to get; valid list types are:
- Diagram
- Element
- Constraint
- Requirement
- Connector
- Status
- Cardinality
- Effort
- Metric
- Scenario
- Status
- Test
- List:DifficultyType
- List:PriorityType
- List:TestStatusType
- List:ConstStatusType
Example:
var statusList as EA.Reference;
statusList = Repository.GetReferenceList("Status");
Session.Output("Status Count: " + statusList.Count);
for (var i=0; i < statusList.Count; i++)
{
Session.Output("#" + (i+1) + ": " + statusList.GetAt(i));
}
Reference Attributes
Attribute |
Remarks |
See also |
---|---|---|
Count |
Short Notes: A count of items in the list. |
|
ObjectType |
ObjectType Notes: Read only Distinguishes objects referenced through a Dispatch interface. |
ObjectType |
Type |
String Notes: The list type (for example, DiagramTypes). |
Reference Methods
Method |
Remarks |
See also |
---|---|---|
GetAt(short Index) |
String Notes: Get the item at the specified index. Parameters:
|
|
GetLastError() |
String Notes: Returns a string value describing the most recent error that occurred in relation to this object. |
|
Refresh() |
Short Notes: Refresh the current list and return the count of items. |