Recent Posts

Pages: [1] 2 3 ... 10
1
I Believe updating external elements on every diagram is not handled by EA.
Also doing this via script is also bit tricky as you know the id of element is changed but it has a connector relation to its previous version so we can updated on other diagrams

Best Regards,
Nabil
2
Thanks for your reply,

I am saving the diagram as image using below method,
Diagram.SaveDiagramImageToFile(filepath);

Diagram in EA details:
Scale="100"
Cx="850" Cy="1098"

Image Details : Dimensions : 616 x 517

image dimensions and EA diagram dimensions not match.

How to save image with the same dimension as in EA??
3
PackageID is not the same as ElementID.
You have to use Package.Element.ElementID

Geert
4
We are about to embark on a serious implementation of Time Aware Modelling (TAM) in our corporate repository.

As we understand TAM, if we have the different versions (of items) in their individual branches, we can use items from another version in the diagrams for a specific version.  So far, so good.

When we clone an element (from another branch from within a diagram in this branch), a clone of the external element will be created in the current diagram branch.  The external element in the diagram will be replaced by the cloned element in that diagram.

Question:  Is there any mechanism to replace the external element in every diagram in the appropriate version, or will we have to "roll our own"?

TIA,
Paolo
5
I'm trying to get a jscript to work that creates a diagram for each package and adds child elements and packages to the diagram.  I've managed to get the child elements to be added to the diagram but not the child packages.

I think its because I'm passing a Package ID to Diagram.Object.ElementID

theDiagramObject.ElementID( childElement.ElementID);
//Substituted the above code that works with element with this below
theDiagramObject.ElementID( childPackage.PackageID);

Here is a snippet of code
Code: [Select]
function AddDiagramToPackage(  thePackage )
{
    // Cast thePackage to EA.Package so we get intellisense
    var currentPackage as EA.Package;
    currentPackage = thePackage;

    var theDiagram as EA.Diagram;

    theDiagram = thePackage.Diagrams.AddNew( thePackage.Name, "Logical" );
    theDiagram.Update();

    var diagramObjects as EA.Collection;
    diagramObjects = theDiagram.DiagramObjects;
 
    // iterate through all child elements and add them to the diagram -THIS DOES WORK
    var elementEnumerator = new Enumerator( currentPackage.Elements );
    while ( !elementEnumerator.atEnd() )
    {
        var childElement as EA.Element;
        childElement = elementEnumerator.item();
var theDiagramObject as EA.DiagramObject;
theDiagramObject = diagramObjects.AddNew("","");
theDiagramObject.ElementID( childElement.ElementID );
theDiagramObject.Update();
  elementEnumerator.moveNext();
    }

    // iterate through all child packages and add them to the diagram -THIS DOESN'T WORK
    var childPackageEnumerator = new Enumerator( currentPackage.Packages );
    while ( !childPackageEnumerator.atEnd() )
    {
        var childPackage as EA.Package;
        childPackage = childPackageEnumerator.item();
childPackage.ElementID;
  var theDiagramObject as EA.DiagramObject;
theDiagramObject = diagramObjects.AddNew("","");
theDiagramObject.ElementID( childPackage.PackageID);
theDiagramObject.Update();

        childPackageEnumerator.moveNext();
    }

I've scoured the help but can't seem to see how to add packages to a diagram via the automation interface. Any thoughts/help welcome.
6
(left + right)/2  ,  (top + bottom)/2
7
Hi,
Thanks for suggestion,

can you please help, how to find/ calculate the absolute center points of the object.

8
Hi Daniel,

I haven't checked for QuickLinker, but for other elements of the MDG, we don't have to restart EA to get the updated MDG installed.  The QuickLinker is a global structure (to which each MDG supplies a portion), so I suspect that it is not possible to unload the existing QuickLinker for a specific MDG (probably because each entry is NOT tagged with the MDG(s) that provided it).  Hence a restart is required.  You can append (as you load MDGs dynamically), but you can't remove.

HTH,
Paolo
9
General Board / Re: Unlock a Block element
« Last post by qwerty on Today at 08:42:42 am »
Guillaume, this will not show the red exclamation mark. It will just disable the OK button in the properties.

q.
10
General Board / Re: Unlock a Block element
« Last post by Guillaume on Today at 08:36:10 am »
You can lock elements even when the security is not enabled.
Having the locked Block displayed on a diagram, a right click will show "Lock Element" - if the padlock is highlighted it means that the element is locked so you simply need to click on this option (Lock Element).

Pages: [1] 2 3 ... 10