Book a Demo

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

Pages: 1 ... 4 5 [6] 7
76
Automation Interface, Add-Ins and Tools / Reporting on Note links
« on: June 11, 2021, 05:43:23 pm »
I'm creating a documentation output of a section of a model. Looking at the Model Report has given me lots of inspiration on how I can do this in a complex way and is mostly working well, except for Notes.

On diagrams I may have general Note elements with no links and Note elements linked to specific elements. Where there is a link I would like to include in the report what element the Note is linked to.

I've done a simple experiment -  a State Machine diagram. On the diagram are two States and one Note. From one state I have a Transition relationship to the other State and also to the Note (yes I know that you can't transition to a Note! It's just an experiment). I also have a "Link" from the Note to the second State (using the Note's Quicklinker).

Using the Model Report template to generate output, under State1 it documents the outgoing behavioural links to State2 and Note. But under State2 it does not document any link to the Note.

Looking at the Model Report, it ultimately includes the Fragment Behavioural and that then includes fragments for various types of relationship including one called General Relationship. I would rather expect that the Link to a Note would appear under General Relationship.

Is there a way to report on the existence of a Note's Link?

In many cases I could (and probably will) include the contents of my Note in the Notes field of the relevant element, but in some cases the note is linked to more than one element and it would be more relevant to include as a Note and list in the document output which elements it is referring to.

77
I've created Jscript code to extract info, including Notes, for inclusion in a Document Template Fragment. It's all working, apart from notes including formatting codes as text.

The page https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/example_output_of_an_rtf_templ.html states "If the text is a formatted Note, add formatted="1" to the field row".

What I can't figure out is how to included the formatted="1" into the field name. I'm using the ActiveXObject( "MSXML2.DOMDocument.6.0" ) to create my XML, following Sparx examples. If I try adding 'formatted="1"' to the name, I get a script error as the name cannot contain a space.

78
On a diagram displayed with the matrix feature turned on, manually dragging the size of columns or rows moves objects on the diagram to remain within the correct column/row, which is good.

I've run into the issue that I sometimes find all the columns or rows are the wrong size (usually too small, but also they can be too large with a desire to condense the diagram). I've written a script that resizes all cells to a new standard size (using an SQL update). However, this doesn't move the objects (the remain in the same physical location as they were before, now in different cells).

I suspect the answer has to be to programmatically decide the pre-modification size of all cells, repeat after modification and then programmatically move all elements. Before I go to the effort of making all those calculations is there anything that I have missed?

79
General Board / Re: SQL search fails on database server
« on: March 04, 2021, 12:23:54 am »
Thanks Geert - double quote is the issue. Where do I find the macros you mention in case I need them later?

80
General Board / SQL search fails on database server
« on: March 03, 2021, 11:15:15 pm »
I have always used EAP/EAPX files for models. We are looking to use a database server and searches that previously worked are failing "Invalid column name 'Requirement'". Strangely Requirement is not a column name but a test value.

I can't find anything in the guidance on searches that mentions differences, although I vaguely recall seeing something on these forums (but can't find that either).

What are the differences between file based models and those on an SQL server that cause issues? How can I change searches so that they work on either file or database hosted models?

81
1. is not true - no generalisation. (I also created a mini project with just these two elements defined so that I could be sure that I was not causing the issue elsewhere!)
2. No difference
3. Solved it, so looks like a substring is matching. I'll raise a bug report.

Also, EA 14.1 worked so something has been introduced since then that causes the fault.

82
I have created a custom MDG and within a model using that MDG defined a Template package to define how some elements appear. But depending on the metaclass of my stereotype elements are wrong...

What I was trying to do:

  • Create a Stakeholder stereotype from the Actor metaclass
  • Create a Stakeholder Group stereotype from the Actor metaclass (a second instance of the metaclass)
  • Template the Stakeholder Group element in rectangle notation
  • Create two custom diagrams, one with the Stakeholder in the toolbox and one with Stakeholder Group in the toolbox

What happens is that when I drop either a Stakeholder or a Stakeholder Group onto their respective diagrams that they appear in rectangular notation (correct for the Stakeholder Group, but not for the Stakeholder that should be appearing as a stick-man/person). Also, the Stakeholder is given two stereotypes - Stakeholder and Stakeholder Group.

Without the Template defined, the Stakeholder appears correctly, with only the Stakeholder stereotype.

As a test, I redefined Stakeholder Group to be derived from a UseCase metaclass (not because I want to but because it also has a rectangle notation option and I have another element that is derived from UseCase).
With this test, I can define my templated Stakeholder Group in rectangle notation, when I drop a Stakeholder on it's diagram it appears as a stick-person, a Stakeholder Group on it's diagram appears as a UseCase in rectangle notation and a Use Case on it's diagram appears as an oval UseCase. All I've done is to drag the Extension relationship from the Actor to the UseCase metaclass and EA behaves differently.

I would ideally like to treat the Stakeholder as an Actor (it is intended to be a group of Actors and in other diagrams may want to behave as an Actor for assigning relationships).

I cannot see anything I have done wrong - can anyone shed light on something I might have overlooked or a reason why EA behaves differently when assigning custom stereotypes and/or templates to an Actor?

83
General Board / Controlling the compartment title/heading
« on: December 03, 2020, 01:01:00 am »
Depending on the diagram, elements sometimes have the heading or title of the compartment (e.g. Parts, Properties) followed by the list of objects in that compartment.

But I have a diagram on which none of the compartments have their heading/title. It makes it hard to understand the diagram. It is my own Block extended from a Class and generalised from a SysML Block.

There is an example here exactly how I'd like it to appear: https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/example_scripts.html
Scroll down about half way to the Attenuator element. Where the Tags have a heading (appropriately of "tags"). There is nothing in the shapescript of that example that adds the heading.
If I paste that exact example into my shapescript I also don't get the "tags" heading.

Do I need to write the text in my own shapescript? If so, how does that integrate with the Diagram properties to turn compartments on and off?

Or (maybe more likely) is there a menu item that I have not been able to find that controls whether compartments have titles or not?

84
I have generalised my own block from the SysML1.4::Block to create myself blocks with customised stereotypes (for example a <<software block>> and a <<hardware block>>). I have also tried extending the metaclass "Class" as that should be how the SysML Block is defined.

I have then defined my own diagram using a toolbox that includes my newly defined block stereotypes. Similarly I have created my own internal block diagram.

That all works and I can use my blocks to create a diagram, use those blocks to create property elements on the IBD. The only thing it doesn't do is pickup on the block diagrams that Properties should be available in the list of compartments.

85
General Board / Displaying "properties" compartment in non-SysML diagram
« on: November 18, 2020, 10:42:53 pm »
If I create a SysML Block diagram, add some blocks and then create a SysML Internal Block Diagram, drag one of my blocks on as a Property and then drag subsequent blocks on top of the first Property they become child parts of the block onto which they are dragged. When I go back to my Block diagram there is a new "properties" compartment in the block listing the child parts. All good. If I right-click on the diagram and open the Properties - Elements section then under Show Compartments there is a check-box against Properties allowing me to choose whether or not to show the compartment.

If I create my own MDG to customise the Block and Internal Block diagrams and repeat the exercise then the "properties" compartment does not appear and is not even listed under the diagram Properties as an option (even though I have child parts of the Block).

I've some across things that work in a special way only for the SysML MDG before and can't be replicated in a custom MDG. Is this one of those, or have I missed something that would enable me to display the child properties in a compartment?

86
I've switched some of my quicklinker definitions from a CSV file to metarelationship / stereotyped relationships defined on diagrams.

But I've just realised that the relationships appear on any diagram where the element is present. Previously, in the quicklinker CSV file, the diagram filter was used so that only relationships relevant to the diagram type were offered.

Is there a way to make the same restriction on the quicklinker contents from  metarelationship / stereotyped relationships to depend on which type of diagram is open?

I've been switching because I was struggling to get one type of relationship definition in the CSV file, but am gradually finding that having a mixture doesn't work (as far as I can tell, if there is any  metarelationship / stereotyped relationship associated with a stereotype then none of the CSV file definitions get applied).

87
Automation Interface, Add-Ins and Tools / Re: Automate add-in testing
« on: March 11, 2020, 07:46:51 pm »
There has been a similar post on here suggesting AutoIt.

I tried it for testing my MDG, but have gone back to manual testing. There is nothing wrong with AutoIt and in some scenarios it would be fine. Issues are the time to develop the test (vs manual testing) and the maintainability - as soon as the next version of EA moves something around then recorded mouse clicks are in the wrong place, menus change (so even trying to automate through keyboard selection of menus changes).

88
General Board / Re: Relationship matrix is skipping one element!
« on: February 25, 2020, 07:19:12 pm »
An obvious question - is it in the right package? A search may find it but it could be in a different package to that specified in the relationship matrix.

A less obvious one is whether it is actually the same type and stereotype as intended? I have seen relationship matrices miss elements because they were subtly different (even if visually the same). I think I figured that one out by changing the Type in the Relationship Matrix from the type we thought it was to <All> and the missing elements appeared. You might of course also end up with other elements that you don't want but it might help work out the cause.

89
An alternative option that I have used is an intermediate step via a spreadsheet. Roughly this was the process:
1. Export the matrix as CSV
2. Open in Excel
3. Create a second sheet to provide a nice presentation format, referencing the CSV export sheet. You might want to do things like rotate the top row text. This included changing the symbol used to represent a connection (I forget what the symbol is in CSV but I think I used an arrow in the second sheet)
4. Save in Excel spreadsheet format
5. Copy and paste the second sheet into Word

To update, re-generate the CSV, copy and paste the data into the excel file and the second sheet automatically updates through its links to the first sheet. Copy and paste that again into the Word doc. I didn't try, but you might be able to automatically embed the just the second sheet into the master document.

In step 3 you can optionally combine the name with the Alias (if that is important to you) by separately exporting names and aliases and using VLOOKUPs to match everything together.

90
Automation Interface, Add-Ins and Tools / Re: Change flowport type by script
« on: September 27, 2012, 09:38:27 pm »
By "type" I meant the Type field that is accessed by right-clicking on the flowport, selecting Properties and in the "Property" page under "Properties" (sorry about all the Properties but that's the way the dialog is organised), there is Type, with a drop-down list of Boolean, Integer, Real, Strind etc.

Pages: 1 ... 4 5 [6] 7