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

Pages: [1]
1
Hello,

What is the difference between a script execution in EA between executing the script normally (e.g. for a project explorer script this is right click on element in project explorer->Scripts->ScriptName) and the debug execution of the script (by opening the script in EA, select the appropriate element in the project explorer and click on the "Play" button above the script.

There seems to be a difference because the same script runs perfectly when launching it via the Play button, but will stop at a certain line when executing it from the project explorer. It will always stop on the same line, at least printf-debugging leads to that assumption.
The "faulty" line is the following:

sourceObj = sequence.GetDiagramObjectByID(sourceElement.ElementID, null);

sourceElement.ElementID is a valid ID, and will be printed out when iterating over all DiagramObjects via sequence.DiagramObjects.GetAt(j)

The workaround is obviously iterating over the DiagramObjects and finding the correct Element. But I'd like to understand what could be the difference here...




2
I have nearly the same query: what rights have to be granted to an SQL user so that he can open and read the repository, but not modify it?
EA will exit with an exception if the user has only SELECT rights...

Was the query answered by support already?

3
Hello,

We use EA v13.0 together with MDG Link for DOORS v2.2 with a repository that is shared through a MS SQL Server database among different users.
I used to import and update requirements from DOORS by MDG Link. That worked fine so far.

A few days ago my laptop was replaced and I tried to update the requirements once again.
Unfortunately the packages are no longer shown as connected to DOORS, so no import is possible with the new laptop. I have the possiblity to "Connect External Project" again, but I'm not sure about the consequences: will MDG Link see the already created requirements or import them once again?

The setup of EA and MDG Link is the same on both machines, but it seems that the configuration is stored on each machine separately. Is this assumption true?
Is there a workaround to migrate the configuration from one machine to another?

Thanks,
Rene

4
We use MDG Link for DOORS 2.2.0 to import requirement into EA. This takes a lot of time on each import, probably because MDG Link sees changes in the requirement text although there was no change in it. We import the requirement text to the Note field. MDG Link for DOORS seems to treat new line (in DOORS "0x0D 0x0A (CR LF)" as a change and thus updates the element in EA.
Is there a way around, e.g. by changing some settings in the EA project?

5
Automation Interface, Add-Ins and Tools / Re: Change appearance of elements
« on: September 26, 2018, 06:28:54 pm »
Perfect! Thanks.
Same location for v13.0, I was looking for some template diagram setting and thus was not able to find it.

Rene

6
Automation Interface, Add-Ins and Tools / Re: Change appearance of elements
« on: September 26, 2018, 05:48:44 pm »
Thanks, all. This is giving some insight.

1. I use version 13.0.1308, in which there seems to be a bug: it seems like a image has been assigned before. But if I set the default image and the alternate image to --NONE--, the image is replaced by the default appearance for that type of element, but still the option for hiding/displaying the name under the image appears in the context menu (default: name is displayed). The only way I found was by an SQL update statement through script (StyleEx contained "DefaultImage=0", removing the DefaultImage in StyleEx will remove the context menu entries and the name under the image).

2. Roy, you seem to be right once more. If I change that elements text, the default text changes for new notes/textfields as well. But sorry: where can I set a diagram as Template diagram?

Rene

7
Automation Interface, Add-Ins and Tools / Re: Change appearance of elements
« on: September 25, 2018, 08:30:53 pm »
1. https://drive.google.com/file/d/1JS_3ahQDqBf4ybp4G8q2SzTn1OqKQlEp/view?usp=sharing (I hope it is allowed to post a link to Google Drive)

2. I create a diagram, select the note element from the toolbox and place a new note in that diagram. The inserted note is not empty. I would expect that a new note does not contain any text.

8
Automation Interface, Add-Ins and Tools / Re: Change appearance of elements
« on: September 25, 2018, 06:25:56 pm »
1. Ok, now I see what you mean.
When this specific element is contained in a diagram, I can have the name of that element displayed below the image (there is an additional sub-menu item in "Appearance". "Show name under image" if the name is not displayed, "Hide name under image" if the name is displayed.)

2. That default text was entered for a note in the past. But it was not the first note for this repository, nor the latest. I just want to have a empty note field as default again...

9
Automation Interface, Add-Ins and Tools / Change appearance of elements
« on: September 24, 2018, 06:04:06 pm »
Hello,

I have some questions on the appearance of various elements in diagrams and how I can change it.

1. There is one component. If I drop this element as a link to any diagram, it will "Show the name under image". By default I don't want that, so after dropping the element I have to select "Hide the name under image". Strange thing here: this happens only for one specific element. Other elements with the same type and stereotypes don't show the name under the image by default.

2. I have default text in the notes field and different text in the text field. Both elements are non-selectable by default. Is there a way to reset the default text and to make these elements selectable by default?

Both items seems to be stored somewhere in the repository, other users observe the same behaviour...

Thanks, Rene

10
General Board / Re: Updating Diagram.StyleEx attribute
« on: September 21, 2018, 12:09:31 am »
No, there is no additional code here.

My assumption was that I need to call the Update method in order to write it into the repository (similar to a SQL commit).

11
Automation Interface, Add-Ins and Tools / Re: EA Integration without Add In
« on: September 19, 2018, 10:31:07 pm »
It will also work if you have a user logged in all the time. Automated task schedule can then access your model through the com module.

12
General Board / Re: Updating Diagram.StyleEx attribute
« on: September 19, 2018, 10:21:12 pm »
Thanks, Geert!
You are right!

The following does not work. The Update() methods seem to revert the SQL update:
Code: [Select]
!INC Local Scripts.EAConstants-JScript

OnProjectBrowserScript();

function OnProjectBrowserScript()
{
// Get the type of element selected in the Project Browser
var treeSelectedType = Repository.GetTreeSelectedItemType();

if (treeSelectedType == otDiagram)
{
var theDiagram as EA.Diagram;
var package as EA.Package;
var diaId;
var name;
theDiagram = Repository.GetTreeSelectedObject();
diaId = theDiagram.DiagramID;
package = Repository.GetPackageByID(theDiagram.PackageID);
Repository.Execute("UPDATE t_diagram set StyleEx='ExcludeRTF=0;DocAll=0;HideQuals=0;AttPkg=1;ShowTests=0;ShowMaint=0;SuppressFOC=1;MatrixActive=0;SwimlanesActive=1;KanbanActive=0;MatrixLineWidth=1;MatrixLineClr=0;MatrixLocked=0;TConnectorNotation=UML 2.1;TExplicitNavigability=0;AdvancedElementProps=1;AdvancedFeatureProps=1;AdvancedConnectorProps=1;m_bElementClassifier=1;ProfileData=;MDGDgm=Extended::Requirements;STBLDgm=;ShowNotes=1;VisibleAttributeDetail=0;ShowOpRetType=1;SuppressBrackets=0;SuppConnectorLabels=0;PrintPageHeadFoot=0;ShowAsList=0;SuppressedCompartments=;Theme=:119;SaveTag=5AB66EC4;' where Diagram_ID=" + diaId + ";");
theDiagram.Update();
package.Update();
return;
}
else
{
// Error message
Session.Prompt( "This script does not support items of this type.", promptOK );
}
}

It works if I replace the Update() methods with
Code: [Select]

Repository.SaveAllDiagrams();

Thanks again!
Rene


13
General Board / Re: Updating Diagram.StyleEx attribute
« on: September 19, 2018, 08:12:41 pm »
Yes, Geert, you are absolutely right:

I'll try to describe my sequence a bit more detailed:
I have a python script running which generates requirement diagrams containing various elements
The generation works, the diagrams are created, containing the elements.

Now I run a different script (from inside EA), in which I try to modify the displayed compartments (I want to have the notes of each element shown).
I've read that I have to achieve this by changing the extended style via a SQL query.
So I read out the extended style from another diagram where the notes are shown.
Now I execute the script on a diagram where the extended style only contains the info on the extended diagram style (MDGDgm=Extended::Requirements;).
Result: extended style is not updated (even though diagram is updated through script and package is reloaded and even EA is restartet).

Now, I execute the script on a diagram where I just open the diagram properties, don't change anything, just close the properties with the "OK" button.
Result of the properties action: extended style is changed, notes are not shown by default.
Result of the script execution: extended style is changed to show the notes, diagram displays the notes of each element as well...

14
General Board / Re: Updating Diagram.StyleEx attribute
« on: September 19, 2018, 12:51:58 am »
I know, this is quite an old topic, but I came to this point this week.
I cannot change the StyleEx in an SQL-Update-statement in a script if the diagram has not yet been touched inside EA before.

"has not yet been touched inside EA before" should express: I generate the diagrams also from a (different) script.


Pages: [1]