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 - Geert Bellekens

Pages: 1 ... 476 477 [478] 479 480 ... 525
7156
Oliver,

There must be an error in either the the registry, or the way it is registered.

- What does your registry key look like?
- Does it work when you build in VS (and have visual studio register it for you)
- Can you post a snippet of your addin class?

Geert

7157
Martin,

I think the first beta of EA v9 is due in a few weeks.
There is a high probability that Sparx will release the MDG vor VS 2010 shortly after that.

Geert

PS. I don't have any kind of formal aknowledgement from Sparx for this, its just my gut feeling  :)

7158
David,

Give it up with those scripts already and start working in real programming language 8-)

Geert

7159
Blawton,

I think there is an error in this part:
Code: [Select]
Set AddingElement = Elements.AddNew(NewElement.Name, "")
AddingElement.ElementID = NewElement.ElementID
AddingElement.Update()
What are you doing there?
You are adding an element to a (to us) unknow collection of Elements, and giving it the elementID of an existing element (newElement). Is this Elements collection the diagram.DiagramObjects collection?

Is there a DiagramObject with ElementType = newConn.clientID in the diagram.DiagramObjects? Otherwise the connection will not show up on the diagram

Some more things to try:
- diagram.Update()
- Check if the new connector is actually created (in the database). If there is something wrong with the ClientID or the SupplierID or some other property EA won't save the connector to the database.
- Check Repository.GetLastError  to see if something comes up there.
- Check dbError.txt in the main EA folder for more details.

Geert

7160
David,

I can't seem to find any reference about this in the manual either, but I've seen that all the examples do have the name of the "main" sub as last statement.

If you send a bug report I'm sure Sparx will update the manual.

Geert

7161
Should be included in V 9 according to this post: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1294607049/1#1

Geert

7162
Gian,

I absolutely agree that it's a bad idea to write directly in the database.
I suggest that you file a bug report/support request.
Usually the Sparxians are happy to help you out with a specific question.

Use the link on the button of the page to report the bug.

Geert

7163
No worries, it IS the most logical thing to do (use the top right box)
Unfortunately this forum isn't really logical ;)

Geert

7164
Gian

Have you searched the forum for "composite". (use the top left button, not the top right input field)
I'm pretty sure your question has already been answerred before. (but I don't recall the details)

Geert

7165
Blawton,

I think the only feasible option is to use Repository.SQLQuery to get a list of diagramIDs.
I've done something similar in the past.
This statement
Code: [Select]
string diagramIDs = myRepository.SQLQuery(@"select do.diagram_id  
from t_diagramobjects do
where do.object_id = " + myElement.Object_ID);
Should return all diagram_id's in an xml string.

Geert

7166
Phil,

I guess deleting it from the Connectors collection should be enough (with a refresh maybe, I'm not sure about that)

Are you sure the model you are looking at with the GUI has already been reloaded?
You might just be seeing a cached copy of the Connector.

Geert

7167
Have fun.

To give you some more stuff to read: this page describes the pattern I used to design the framework for my addin.

Geert

7168
David,

Take a look at my EA navigator addin on the community site.
That includes the source code in C# and it should give you a good start for writing C# addins.

Geert

7169
try "dim supplierID as Integer"
It might be that by passing a variant to the getElementByID you get the error.

Geert

7170
I just tested this on my machine (v 8.0.862) with following C# code:

      
Code: [Select]
public static void test()
        {
            ACVModel model = new UMLToolConnector().getCurrentModel();
            EA.Repository repo = ((EAModel)model.getUMLModel()).getWrappedModel();
            EA.Connector connector = repo.GetConnectorByID(1);
            EA.Element supplier = repo.GetElementByID(connector.SupplierID);
            EA.Element client = repo.GetElementByID(connector.ClientID);
            EA.Element associationClass = repo.GetElementByID(int.Parse(connector.MiscData[0]));
            string associationClassName = associationClass.Name;
        }
and it works perfectly. I have both the supplier, client and associationClass elements.

Geert

Pages: 1 ... 476 477 [478] 479 480 ... 525