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

Pages: [1]
1
General Board / Glossary
« on: May 08, 2018, 08:53:25 pm »
Hi all
Is it possible to extract the EA glossary in a more convenient format / way. At the moment I have some glossaries which when I extract them out of EA have entries which are too long for one line and thus get cropped.

2
Automation Interface, Add-Ins and Tools / Re: Adding Tags via Javascript
« on: January 25, 2018, 01:40:04 am »
I think that is what happened:
I initialize it like this:
Code: [Select]
rootElement= Repository.GetTreeSelectedObject();
   
DumpElements("", rootElement);
and it seems this sometimes does not work and I get null. After checking if the tags exist it runs through:
Code: [Select]
if(tags!=null){
newTag = tags.AddNew(taggedValueName, taggedValueValue);
}

Thanks to all the answers. I was not aware the getTreeSelectedObject was this dangerous.

3
Automation Interface, Add-Ins and Tools / Re: Adding Tags via Javascript
« on: January 25, 2018, 12:54:40 am »
Code: [Select]
function SetElementTaggedValue(indent, theElement, taggedValueName, taggedValueValue)
{
var currentElement as EA.Element;
currentElement = theElement;
var tags as EA.Collection;
tags = currentElement.TaggedValues;
var newTag as EA.TaggedValue;
newTag = tags.AddNew(taggedValueName, taggedValueValue);

and it is called like this:
Code: [Select]
var currentElement as EA.Element;
currentElement = theElement;
var childElementEnumerator = new Enumerator(currentElement.Elements);


// Tag the current element with its alias
SetElementTaggedValue(indent, currentElement, "old_ID", currentElement.Alias);

4
Automation Interface, Add-Ins and Tools / Re: Adding Tags via Javascript
« on: January 25, 2018, 12:38:23 am »
I tried to do it that way and added this:
Code: [Select]
var currentElement as EA.Element;
currentElement = theElement;
var tags as EA.Collection;
tags = currentElement.TaggedValues;
var newTag as EA.TaggedValue;
newTag = tags.AddNew(taggedValueName, taggedValueValue);

Now I get a similar error in your code:
Quote
Error
Test Scripts.AliasToTag
tags is undefined, Line: 106

which is this line:
newTag = tags.AddNew(taggedValueName, taggedValueValue);

The reason must be somewhere else...

5
Automation Interface, Add-Ins and Tools / Adding Tags via Javascript
« on: January 25, 2018, 12:08:07 am »
When I try to tag elements in a model I get this problem:
Quote
Error
Test Scripts.AliasToTag
currentElement.TaggedValues is undefined, Line: 115

This error occurs when I try to tag the elements:
Code: [Select]
var currentElement as EA.Element;
currentElement = theElement;

var taggedValue as EA.TaggedValue;
taggedValue = null;

if(currentElement != null)
{
// Output the current element's name and alias
Session.Output(indent + "Element=" + currentElement.Name + ", Type=" + currentElement.Type + ", Alias=" + currentElement.Alias);

        taggedValue = currentElement.TaggedValues.AddNew(taggedValueName, taggedValueValue);
currentElement.TaggedValues.Refresh();
taggedValue.Update();
}

in this line:
taggedValue = currentElement.TaggedValues.AddNew(taggedValueName, taggedValueValue);

6
Bugs and Issues / Re: Cannot lock packages
« on: January 03, 2018, 08:30:22 pm »
Ah I found this other thread where someone had the same problem and it was a wrong settings in the perspectives:
http://www.sparxsystems.com/forums/smf/index.php/topic,39027.msg241665.html#msg241665

Problem solved...

7
Bugs and Issues / Cannot lock packages
« on: January 03, 2018, 08:22:27 pm »
For some time now I cannot lock a package: The right click menu has no points to lock packages.
I can only see "Merge package with XMI File"

Did I disable this by accident and if so where?

Pages: [1]