Hello,
with the help of the forum during the last weeks, i have made a script that i can generate "parent" and "child" element and it appears the hierarchy in the project browser. I could also, generate a relationship(Realization) between the elements, when they are generated in a diagram. But, in fact, i would like to put the child element inside the parent element, does anyone know if it is possible using VBscript? For now, i have the parent element as a "stakeholder" and the child element as an "Action". For know i have this script, which works to build the relationship between parent and child.
Dim objElement
Set objElement = objElementParent.Elements.AddNew(child, "Action")
objElement.Update
dim newObjectparent
set newObjectparent = diagram.DiagramObjects.AddNew("", "")
newObjectparent.ElementID = objElementParent.ElementID
newObjectparent.Update()
dim newObjectchild
set newObjectchild = diagram.DiagramObjects.AddNew("", "")
newObjectchild.ElementID = objElement.ElementID
newObjectchild.Update()
Set connector = objElementParent.Connectors.AddNew("", "Realization")
connector.SupplierID = objElement.ElementID
connector.Update()