Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
DiagramObject Class
The DiagramObject Class stores presentation information that indicates what is displayed in a diagram and how it is shown.
Associated table in .EAP file: t_diagramobjects
DiagramObject Attributes:
Attribute |
Type |
Notes |
See also |
---|---|---|---|
Bottom |
Long |
Read/Write The bottom edge position of the element.
|
|
DiagramID |
Long |
Read/Write The ID of the associated diagram.
|
|
ElementID |
Long |
Read/Write The ElementID of the object instance in this diagram.
|
|
InstanceID |
Long |
Read The attribute that holds the connector identifier for the current model.
|
|
Left |
Long |
Read/Write The left edge position of the element.
|
|
ObjectType |
Read only Distinguishes objects referenced through a Dispatch interface.
|
|
|
Right |
Long |
Read/Write The right edge position of the element.
|
|
Sequence |
Long |
Read/Write The sequence position when loading the object into the diagram (this affects its Z order). The Z-order is one-based and the lowest value is in the foreground.
|
|
Style |
Variant |
Write only (reading this value gives undefined results) The style information for this object.
|
|
Top |
Long |
Read/Write The top edge position of the element.
|
|
DiagramObject Methods
Method |
Type |
Notes |
---|---|---|
GetLastError () |
String |
Returns a string value describing the most recent error that occurred in relation to this object. This function is rarely used as an exception is thrown when an error occurs.
|
Update () |
Boolean |
Update the current DiagramObject after modification or appending a new item If false is returned, check the GetLastError function for more information.
|
Topics
Topic |
Detail |
See also |
||||||||
---|---|---|---|---|---|---|---|---|---|---|
The Style attribute is used for setting the appearance of a DiagramObject; it is set with a string value in the format:
BCol=n;BFol=n;LCol=n;LWth=n;
where:
The color value is a decimal representation of the hex RGB value, where Red=FF, Green=FF00 and Blue=FF0000
DiagObj.Style = "BCol=35723;BFol=9342520;LCol=9342520;LWth=1;"
The following code snippet shows how you might change the style settings for all of the objects in the current diagram, in this case changing everything to red:
For Each aDiagObj In aDiag.DiagramObjects aDiagObj.Style = "BCol=255;BFol=9342520;LCol=9342520;LWth=1;" aDiagObj.Update aRepos.ReloadDiagram aDiagObj.DiagramID Next
|
|