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 - Squeegee

Pages: [1]
1
We figured it out :D
The hint with the registration of Control class itself was the correct one - thanks Geert!

Just to give others a idea if they read the post:

There were two problems:

1. Instead of making all classes COM visible (Project Properties --> Application --> Assembly Information --> Make assembly COM-Visible) we decided to make this explicitly in the code by adding 
Code: [Select]
[ComVisible(true)] on top of the addins main class -> Well... should've been obvious to do the same for Control Class  ::)
2. After doing this and redoing this cracy reg-file creation and patching it, the Control class was part of the registry file --> And therefore obviously registered

And... it worked  8)

Many thanks for the help Geert

2
We do not use installers as we want to deliver the addins via a package manager (chocolatey). Therefore we figured out this post:
https://stackoverflow.com/questions/37193356/registering-net-com-dlls-without-admin-rights-regasm
We create a reg file following this procedure and then on bottom add the "normal" Sparx registry entries:

[HKEY_CURRENT_USER\SOFTWARE\Sparx Systems\EAAddins64\AddInName]
@="Namespace.MainClass"

So far this seems to work pretty good. What do you mean with "register all classes for 64 Bit"?

Edit: We do this crazy registry thing as then we don't need Admin rights for installation.

3
Hello all,
we're migrating to EA 16.1 64 Bit version and therefore also have to migrate the Addins we have.
Generally Addins work meanwhile but we have trouble with function "AddWindow".

Our Addin is based on .NET Framework 4.8.1

Here a code extract:

Code: [Select]
if (buttonWindow == null)
{
    buttonWindow = (TheButtonWindow)pRepository.AddWindow("ButtonWindow", "ButtonWindowProgId");
    var test = pRepository.GetLastError();
    buttonWindow.currentRepository = pRepository;
    buttonWindow.designer = this;
}

where "TheButtonWindow" is defined like follows:

Code: [Select]
    [ProgId("ButtonWindowProgId")]
    public partial class TheButtonWindow : UserControl
    {...}

So far we used EA15.2 and this code worked pretty good, although we didn't expect much, we did a "GetLastError()" which returned:

Failed to create control, error code (298)


Does anyone know what this error code means? Any ideas?

Thanks for every hint :D

4
Hello Everyone,
when generating a document with the document generation engine of EA, we have some text which we want to use in different documents but maintain on one central place in the model. Therefore the first idea was to have a "template for text" consisting of several artifacts of rtf documents (from the common toolbox). To add them at certain places in the model we thought creating "instances" from this artifact might work - but it didn't and we're running out of ideas.

Has anyone an idea how to handle several small document fragments (right now the rtf artifacts) on a central place and use them in different generated documents? Also storage outside of the EA would be possible (we have a version control system), but we did not find any proper method to handle this and are open for all suggestions :-)

Thanx so much
Uwe

5
General Board / Re: not showing classifier name of ports at instances
« on: October 17, 2018, 07:02:42 pm »
Hi Arshad,
seems to be exactly what I was searching for but doesn't exist in EA 12 >:(
So we have to wait for a newer EA version to be used in my company...

I assume there is no other possibility via scripting or something else??

6
General Board / Re: not showing classifier name of ports at instances
« on: October 17, 2018, 04:40:52 pm »
Hi qwerty,
I do not want to hide the whole label, just the "NameOfPortAtClassifier", which is only a part of the label.
So something like switching on and off showing the stereotypes of elements which is possible in the diagram options, tab elements, "show element stereotype".

Regards,
Uwe

7
General Board / not showing classifier name of ports at instances
« on: October 17, 2018, 12:54:59 am »
Hi Forum,
If I put an instance of a class with ports into a diagram, the name of the ports look like follows:

nameOfPortAtInstance/NameOfPortAtClassifier

In some diagrams I would like to suppress "NameOfPortAtClassifier" as this information is not needed and the diagram looks a bit "overloaded".
Is there any possibility to achieve this?

Thanks for your answers..

Uwe

8
Finally it worked, if anyone has the same use case, we solved it like follows:

Pre-Condition: A class with ports in a package (this is the "child")
The we do the following manual steps:

1) Copy and paste the whole package (the copy is then the "parent")
2) Create an generalization between child and the newly created parent
3) Run the diagram script on the child class..

The script loops through all embedded elements of type port in  the child, follows the generalization and looks up, if there is a port with the same name on the parent.
If yes, it add's the GUID of the parents port at the child port using the following sql command:

UPDATE t_object
SET pdata3 = parentGuid
WHERE ea_guid = childGuid;
using the Repository.Execute() API.

Thanks to Geert for his really helpful hints!


9
We're a little bit later than before :-)

there is a reference from the child port to the GUID of the parent port like follows:
<UML:TaggedValue tag="reusesProperty" value="{F719F346-C297-4b6b-A4CA-CA4D783FE0C1}"/>

Unfortunately, this values is stored in EA.Element.MiscData which is ReadOnly and the EA help tells me that it is not possible to access it via automation.
Now I am running out of ideas...

10
Hi Geert,
thanks for the fast reply, I've never done something like that :-)

Will try and come back later.

Uwe

11
Hi,
we have the following challenge (using EA 12):

A lot of classes with ports which are used in several diagrams (as links or as instances). Now we want to create abstract parent classes out of them. So basically the other direction than provided automatically when dragging a class into a diagram and choose option "Child (Generalization)" from the menu.

For sure it is possible to simply copy the whole class with all ports and create the generalize connector manually.  Unfortunatelly then we get all the ports from the parent via "structural elements "Show Owned/inherited" from the parent so we have all ports twice in the child class - the real generalized ports and the already existing one in the child. But exactly the already existing ones are connected to all the other elements, so we have to update each and every diagram in the whole model.

Therefore my question is:
Is there a possibility to create a parent for an existing class with ports, where the existing ports are also automatically child ports?
We also tried using the automation via VBscript but so far we failed as we did not find how  the port of the children "knows" that he is a generalized port.

Any suggestions are welcome :-)

Thanks
Uwe

Pages: [1]