Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Helmut Ortmann

Pages: 1 ... 63 64 [65]
961
Automation Interface, Add-Ins and Tools / Call Addin from VB script
« on: August 15, 2012, 10:02:18 pm »
Hello,

is there a simple way to call an Addin from VB Script?

Thanks in advance,

Helmut

962
Automation Interface, Add-Ins and Tools / Re: virtual document
« on: July 31, 2012, 01:05:16 am »
Hi,

have you looked in the example model (Help, Open Example Model), package Reporting?

Kind regards,

Helmut

963
Automation Interface, Add-Ins and Tools / MDG Visual Studio and C
« on: July 28, 2012, 03:23:16 pm »
Hello,

has someone experiences in Visual Studio and C?

We are planning to use this but I'm not sure if it really works.

Thanks in advance,

Helmut

964
Hello Thomas, Hello Geert,

thanks a lot!

I have my workaround and I will post a bug report.

Kind regards,

Helmut

965
Hi,

thanks a lot. Looks simple but I wasn't aware of it.

Kind regards,

Helmut

966
Hello,

I have a Composite Structure Diagram with a class and two parts inside the enclosing class. The two parts are connected by a flow or a connector. The flow is selected and the addin should return the flow after calling GetContextItem. It returns the enclosing class instead.

Without the enclosing task everything works as expected.

Thanks,

Helmut

967
Hi,

it's worth reading it. My suggestion is to also read the e-book InsideEA. Some advanced features are only to accomplish by using SQL.


Enjoy reading and trying it,

Helmut

968
Hi Paulus,

I attach an example in C#. It works and I use this snippet to attach a linked note to a diagram object.

                        EA.Element el = (EA.Element)Repository.GetContextObject();
                        EA.Package pkg = Repository.GetPackageByID(el.PackageID);
                        if (pkg.IsProtected || dia.IsLocked || el.Locked || dia == null) break;

                        // save diagram
                        Repository.SaveDiagram(dia.DiagramID);
                        
                        EA.Element elNote = null;
                        try
                        {
                            elNote = pkg.Elements.AddNew("", "Note");
                            elNote.Update();
                            pkg.Update();
                        }
                        catch { break; }

                        // add element to diagram
                        // "l=200;r=400;t=200;b=600;"

                        // get the position of the Element
                        EA.DiagramObject diaObj = null;
                        foreach (EA.DiagramObject dObj in dia.DiagramObjects) {
                            if (dObj.ElementID == el.ElementID)
                            {
                                diaObj = dObj;
                                break;
                            }
                        }
                          int left = diaObj.left + 2*(diaObj.right - diaObj.left);
                        int right = diaObj.right + 2 * (diaObj.right - diaObj.left);

                        string position = "l=" + left.ToString() +";r=" + right.ToString() + ";t=" + diaObj.top.ToString() + ";b=" + diaObj.bottom.ToString() + ";";
                        EA.DiagramObject diaObject = dia.DiagramObjects.AddNew(position, "");
                        dia.Update();
                        diaObject.ElementID = elNote.ElementID;
                        diaObject.Update();
                        pkg.Elements.Refresh();

Other ressources are:
- Online Help EA (examples)
- E-Book ScriptingEA from Thomas Kilian

Kind regards,

Helmut




969
Hello Geert,

thanks a lot. I just found the solution. I think a hidden method.

It works!

Kind regards,

Helmut

970
Hello,

I wanted to use the undocumented function Repository.Execute(..). I can't see it with Visual Studio. The other functions are available. In the Object Catalog it's marked gray as opposed to black for the other methods.

Is there a special trick to use this function?

Kind regards,

Helmut

Pages: 1 ... 63 64 [65]