| Relations can only have attributes of the type: [Date, Datetime, Enumeration, Enumerationlist, Expression, Floating number, Integer, Longstring, Programcall, String, Time], which can be displayed in the Graphrep as attribute dependent graphical representation. Hence, relations can not include other objects but may have any attribute from aforementioned types, which can be displayed next to the relation. See a small sample for an ellipse and an integer as mentioned in the text.
MIDDLE ATTR "a" x:0.00cm y:-1.00cm w:c h:c ELLIPSE x:0.00cm y:-1.00cm rx:0.5cm ry:0.25cm
Extension Objects can be referenced using following possibilities: Include object references in one of the classes that are connected by the relation. Make new – hidden – attributes in the notebook storing the “referenced objects” which can be and populated and received with AdoScripts. Resolve the relation that connects two classes, into two relations and an additional class in between. This new class can have the required inclusion of other objects. Adding this class can be performed either manually or by implementing an ADOscript
Writing an Adoscript for one of aformentioned possibilities will listen for the event: BeforeCreateRelationInstance
ON_EVENT "BeforeCreateRelationInstance" { CC "Core" GET_OBJ_NAME objid: (frominstid) SET objname1: (objname) CC "Core" GET_OBJ_NAME objid: (toinstid) SET objname2: (objname) IF (objname1 = objname2) { EXIT -1 } } |
|