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

Pages: [1] 2
1
The file storing the local paths is updated when I use the local path dialog.
However, if I then stop EA and start it again the file path.txt is overwritten with an empty paths.txt with a
data of 2003 !

This is happening without any other process changing the roaming profile ! I can indeed close EA, edit the
file, start EA again and the error occurs.

This is almost certainly a bug. Does anyone else use the feature of local paths for code generation in EA 16.1 ?
I checked the 15.2 version of EA. The local path is persisted correctly with this old version. I do not where the old version stores
the path, it does not appear to be in the same file.

Thanks for any help with this

2
Bugs and Issues / Re: Local Paths for code generation are not persisted
« on: February 22, 2024, 09:08:07 pm »
thanks querty and Geert - that helps me already

3
Bugs and Issues / Re: Local Paths for code generation are not persisted
« on: February 22, 2024, 03:25:11 am »
Hi Eve, and thanks for your quick answer. I am aware that these are user settings and should be so. But where are they stored if not in the repository. Can you please point me to the location for users settings e.g., roaming profile folder etc. ? I can then follow up with IT support. I did browse the documentation for this but no success.

Thanks for any help
Cheers
Stefan

4
Bugs and Issues / DataType artifact not picked up by the code generator
« on: February 15, 2024, 01:10:39 am »
If you select a class, interface or enumeration in a diagram and click on "Generate single element" the code generator dialogue will appear.
For some reason DataTypes are ignored here when selected in the diagram - you need to select them in the project browser.

5
Bugs and Issues / Local Paths for code generation are not persisted
« on: February 15, 2024, 12:00:01 am »
Hello Sparx,

when defining and saving local paths they are not stored in the repository. After I close and reopen EA the paths are gone !
https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_domains/localpaths.html

Thanks for any help
Stefan

6
Hello Eve,

I did manage to find my way into the model add-ins and added some behaviour code, see below.
Can I just code this in JScript for example and use the Add-In with the macro you mentioned above ?

Thanks
Stefan

var elem as EA.Element;
var tag as EA.TaggedValue;
var tags as EA.Collection;
elem = Repository.GetElementByID(elementID)
tags = elem.TaggedValues;
tag = tags.GetByName(tagName);
return tag.Value;


7
Here's some working code, based on Geerts suggestion, if someone is interested:

         var baseClasses as EA.Collection;
                  
         //   find the superclass, don't consider if multiple superclasses exist.
         baseClasses = relatedElement.BaseClasses;
         if (baseClasses.Count == 1)
         {
            parentElement = baseClasses.GetAt(0);
         }

8
Hi Geert,

thanks for you quick and competent reply. I will try Element.BaseClasses which will be much simpler of course.
As to the iterator, I guess my JScript skill is pretty basic and I don't yet know all its possibilities. Thanks for the hint.

Cheers
Stefan

9
Hi community,

I am looking to programmatically find the superclass of a given class in my diagram, trying to do this with the relationships of the class:

         //   find the superclass      
         while ( !connectorsEnumerator.atEnd() )
         {         
            connectorToCheck = connectorsEnumerator.item();
            if(connectorToCheck.Type = "Generalization")
            {
               parentElement = Repository.GetElementByID(connectorToCheck.SupplierID);
               break;
            }
            connectorsEnumerator.moveNext();
         }

Neither ClientID nor SupplierID of the connector seems to point to the superclass. What am I missing ?
Or is there a better way to find the superclass of a related element of a diagram element ?

Thanks for your thoughts on this.

Cheers
Stefan      

10
Hi Eve and thanks for your quick reply !
I was not aware of this macro. I will have to look up how the create the "MyAddIn" ?
Any example you can point me to ?

Checking the documentation I don't see the possibility to code an add-in as a JScript in my script library.
Do I really have to create a DLL in a foreign IDE in order to get this "missing" feature ?

Thanks
Stefan

11
Hello EA community,

I am trying to evaluate tagged values inside of the code generator of EA.
Using the tagged value substitution macro I try

$tagName = "test"
$tagValue = %classTag:"$tagName"%

Unfortunately the variable $tagName is not evaluated and the $tagValue stays empty.
If I replace the variable with a literal of the tag name then it works.

Is this a bug or a missing feature ?

Thanks for any help

Cheers
Stefan

12
Hello forum,

we are creating taggedValues for classes and attributes to link to an external business glossary. It works fine inside of EA Version 15.2 - the urls can be clicked to jump to the external html page of the business glossary.
If we create standard html export from diagramms that include these tagged values then following problem arises:

The https:\\ is translated perfectly well for the tagged values of the attributes because the class details automatically show the taggedvalues of each attribute. For these cases the html is well formed
and thus clickable. However, the taggedValue for the class itself is put in quotes in the html export i.e. not recognized as a url. To be more precise, the name of the taggedValue is displayed and then the value
is displayed as:

<a href="https://elia.data3sixty.com/asset/6ed21646-b21b-4960-8a03-8bcd15843891" target="_blank" >https://elia.data3sixty.com/asset/6ed21646-b21b-4960-8a03-8bcd15843891</a>

obviously the html generator interprets values strictly as strings for the tagged values of the class but not for the taggedValues of the attributes ? Any idea if this is a bug or a feature ?

Thanks for any ideas

Cheers
Stefan

UPDATE: I have now installed Version 16 which fixes the issue above. However - unfortunatly - the html publication in EA Version 16 is pretty buggy e.g. navigation cells don't work on the html page. I opened a bug report.

13
what is also interesting - when adding the hyperlink using the subtype 19 it is set to a link type "File". I can set the Address via element.Name
but I have no clue how to change the link type to "web site". Could it be that I have to go to the dirty ways of SQL interaction with the repository
to do this ?

I found it: contentElement.Name = "$inet://https://..../asset/fbe3455c-f811-4b8f-b747-1343ebfd808d" will change the link type to "web site".

And with a bit of trial and error I found:

- the hyperlink object is actually added to the diagramobject
- it is the z-order that needs to be fixed and the location where I drop the hyperlink via code. So

diagramObject.Sequence = diagramHyperlink.Sequence+1;

after I make sure the hyperlink is created on (geometrically) in the area of the diagramObject.

So now I have the solution I was looking for

Cheers

14
Not a problem Geert. I am also puzzled at why code lets me add the hyperlink to the class but then
shows it outside the class. Given the behavior for the wireframehyperlink it was my assumption that it
should work as well with the hyperlink(text with subtype 19).
I opened a ticket with sparx about the wireframehyperlink that is created in my original code. They will hopefully
come back with the same sort of insight you gave in your initial reply.
I will try to "complain" about the problem with adding the hyperlink to the class' elements collection.
Will keep you posted if there is a solution. Please let me know if some idea pops up at your end.

Thanks
Stefan

15
In fact, using the EA GUI you can drop a hyperlink directly onto a class and it is embedded. Try it yourself.

Pages: [1] 2