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.


Topics - ZuluTen

Pages: [1]
1
This must be the simplest question ever posted, for which I feel mildly embarrassed, but not too embarrassed to ask publicly:

I’ve come to terms (ish) with the vagaries of the RTF report generator, but now need to create an HTML model and place it in Sharepoint for review by various stakeholders.

Strangely the export to Sharepoint was the easy bit, once we realised that replacing the letters html with aspx in the File Extension field of the 'Publish as HTML' window made everything work seamlessly.

However, what I now want to do is have a text string displayed in the header of every web page, to convey a commercial sensitivity caveat to remind all viewers. Sadly Sharepoint permissions are not considered sufficient.

There doesn't seem to be a lot of information on the web about how to modify the Web Style Templates, other than playing with the logo, and if all else fails I shall cheat by amending the logo to carry the caveat text.

Anyway, I have found my way to Resources > Web Style Templates and can generate my own HTML template by copying the default one, but am utterly bewildered by where to define header text within the plethora of fields available.

I've used the examine html facility in the browser of an exported html page to find areas called IndexTitle and IndexHeader but am unsure how/where I can add a constant string to them.

Can anyone please help?

Many thanks

2
Bugs and Issues / This is the only sub forum where I can post...
« on: February 15, 2022, 08:57:30 pm »
This is about a bug on this Board rather than in EA:

Whenever I try to post in the Automation Interface, Add-Ins and Tools sub-forum I receive this message:
"Database Error
Please try again. If you come back to this error screen, report the error to an administrator."


Unfortunately I can't see a means of contacting an admin, so am posting here.

Does anyone know why, after 40+ posts in the past, I am apparently barred?

Thanks

3
I am building a bespoke MDG Technology.

I have previously built a number of MDGs so am happy with the process.

To get a standard Class diagram within my MDG I have a package <<diagram profile>> within which is a stereotype of <<my_diagram_name>> that extends to a metaclass named "Diagram_Logical".

That is all quite successful.

However, I need to include a roadmap diagram, i.e. a Class diagram where as soon as it is instantiated, it automatically has the roadmap timeline displayed at the top, and a pre-defined Legend displayed on the diagram. Better still if there are a couple of horizontal swimlanes.

Doing this all manually is obviously straightforward, but I need a novice user to be presented with the arranged diagram.

I cannot figure out (a) if it is possible, and (b) which attributes I should set either in the stereotype or the metaclass to make this happen.

Can anyone help, please?

Many thanks in advance.

--------------------------------------------------------------

Edited to add a link to a picture of the roadmap format, with a couple of elements dragged onto it.



Gave up with Dropbox, now using imgbb.com

4
Bugs and Issues / EA_MenuClick and use of Location
« on: August 10, 2014, 08:43:02 pm »
The Sparx produced VB Framework which Sparx has very kindly provided to me includes the following code:
Code: [Select]
Public Sub EA_MenuClick(ByVal Repository As EA.Repository, ByVal Location As String, ByVal MenuName As String, ByVal ItemName As String)
Repository.WriteOutput(My.Resources.OutputTabName, "event: EA_MenuClick Location=" + Location + ";MenuName=" + MenuName + ";ItemName=" + ItemName, 0)
        Select Case ItemName
etc ……

However, having used it, it seems to me that no matter which means of menu click (TreeView, MainMenu or Diagram) is used to trigger the function, the Location string is always set to “Diagram”.

I note that the EA User Manual is slightly contradictory for the functionality of the MenuClick command and variously includes and then ignores the Location argument.

This makes me unsure of whether it’s a bug or a feature?

Oops, nearly forgot: EA v11 build 1107

5
I am attempting to programmatically analyse a sequence digram in order to better understand where an element has an effect on other elements.

The intention is to select a single element lifeline on a sequence diagram and then run the analyser as part of my Add In, resulting in all sequence diagrams in which that element plays a part turning red along the sequence/connector path.

Using a SQL query of t_connectors where connector type = “Sequence” is fairly straightforward, and yields an array of target and connector IDs  and I can easily change the colour of all the connectors emanting from a particular element.

I can then repeat the exercise, in each case replacing client with supplier until the end of a sequence of reached.
Simples!

Where I am struggling is in dealing with vertically discontinuous lifelines: I can't work out how to isolate only those connectors which exist(link) in the same vertical 'block' of any given lifeline:

Maybe the only way is to figure out the upper and lower 'Y' values for each of the discontinuous block and then see whether when drawn the connector arrow tip falls within the Y limits, but that seems rather crude. Surely there's a more elegant way?

Scouring 'Inside EA' yields no clue as to where the lifeline discontinuities are stored, so I'm at a loss.

Thank you in advance for any suggestions...

6
Automation Interface, Add-Ins and Tools / My Add-In is on a go slow
« on: August 12, 2014, 06:30:02 am »
I wonder whether I'm expecting too much...?

I've got EA version 11 running directly on a reasonable spec PC (3.2GHz i5  12Gb RAM running Windows 7/64).

I have written an Add In that parses an xml source file in order to generate a number of packages, objects and diagrams.

The xml file is approx 5Mb, and contains roughly500 nodes, which I have to burst in order to generate the commensurate number of packages and diagrams.

Each object also gets populated with a number of tagged values derived from the parsed file.

There are no connections (yet).

The completed .eap file is a little under 4Mb in size, because I waste much of the source data.

My Add In is, I think, fairly efficient in its structure – it's written in vb using Visual Studio 2010 and compiles to dll without any apparent problems.

The sticking point is that the process takes about 10 minutes to run!

It doesn't seem linear though: The process kicks off, processes the first 20 nodes, updates the Project Browser, and then apparently stalls for literally minutes with the EA window showing 'Not Responding'. Eventually it recovers, then does a variable amount (between 20 and 50) and then apparently stalls again. This repeats until the whole xml has been parsed, and the correct desired outcome is reached

The stalling always occurs at the same xml nodes, and although these don't seem to differ from any other nodes, it suggests to me a programmatic shortcoming in the seat/keyboard interface.

So: Are there any obvious stupid mistakes which I, as a beginner, might have made that could result in such an appallingly slow process?

I wondered about the use of update or refresh and whether the underlying database could be getting out of sync with the Add In, and eventually recovering, but that seems a bit unlikely.

I used EA's built-in vbscript to develop some of the modules and frankly that didn't seem much faster, so I'm bewildered.

I wondered whether I was using/abusing objects badly in my code, or possibly failing to declare variables  correctly, but a revisit doesn't seem to have improved things.

I shan't be offended no matter how basic the suggestions of what to check...
..or suggestions of how to use any diagnosis tools.

Thanks in advance.

7
Using EA v11 I have successfully used patterns to build a number of behavioural and structural constructs – I have also embedded them in the toolbox of my MDG.

As an example, but not to be taken too literally, I have a generic DesktopComputer (of stereotype <<component>>) which is comprised of the following items which are of significance to my model:
MS Office <<Application>>
Skype <<Application>>
Windows 7 <<Operating System>>
Optical Disk Drive <<Interface>>
Gigabit LAN <<Interface>>
USB Socket #1 <<Interface>>
USB Socket#2 <<Interface>>
KVM<<Interface>>

Initially I built a single diagram showing the DesktopComputer<< component>> and inside it I placed the various interfaces and components.

I then saved the diagram as an xml pattern, listed it in the appropriate Toolbox Page Extension and combined it into the MDG.

That works fine:  My MDG Toolbox shows DesktopComputer as a stereotype, which when dragged and dropped onto a diagram (let’s call it the Generic_IT_Repository_Diagram) and named as “My_Company_Standard_Desktop_Design_Type_1” works fine, and the Project Browser shows that the ‘primary’ component contains all the relevant internal components.

Unfortunately however, when I then take instances of this component onto a deployment diagram, by dragging and dropping and using Paste As Instance, only the top level DesktopComputer appears on diagram, and the Project Browser shows it has not having the lower level components.

A bit of internet research revealed the concept of the Composite Element, so I re-built one of my patterns as a Composite Element complete with chain symbol, saved that as a pattern, incorporated in the Toolbox, but this time dragging from the Toobox fails to generate anything other than the single top level component, so that is worse than before.

I did, by the way, try simply dragging the Composite Element from the Project Browser and that works fine.

I’m unsure whether the problems are as a result of (a) my failure to use the correct elements, or; (b) an attempt on my part to use EA for something for which it was not intended, or; (c) an attempt on my part to breach the rules of UML.

Any help in resolving which would be much appreciated.

8
I would like to customise the Enterprise Architect GUI so that the user is presented with only the menu items which they need to perform their job, and is not bemused and confused by the myriad of other features which the application offers, but which are superfluous to that user.

I have successfully got my Add In working and appearing in the MainMenu>Extensions>MyAddIn area of the EA Main Menu.

Unfortunately, according to Sparx it is not possible to modify the Main Meni to remove (irrelevent to my user) entries such as 'Project' and 'Analyzer' so, unless anyone out there knows differently I shall have to reluctantly live with them. Though I can't believe that I'm the only developer who would like to modify EA in this way...

What I have found is a second choice workaround using the View>Workspaces and Commands window to uncheck all the Menu Options which I don't want to display to my user.

I have also noticed that once the settings are manually ticked/unticked as appropriate, the resulting combination of choices may be saved as a Command Set where I had assumed that it becomes absorbed as part of the .eap file.

That idea was quashed when I found that opening an instance of EA without a project loaded provides the previously chosen combination, which makes me wonder where they (Sparx) have hidden it.

Does anyone know where the Command Set is stored? And whether it is then feasible to re-load it programatically as part of a fresh installation?

Many thanks in advance for any help received...

9
I'm having trouble getting some of my Add In code to work, which should, whenever a new element is dragged and dropped from the Toolbox, automatically populate a Tagged Value called 'Analyst' with the name of the user.
The error message is :
EA_OnPostNewElement: Public member 'Analyst' on type IDualCollection' not found
This I assume means it can't find the Tagged Value but I even ran a simple diagnostic (the commented out Message Boxes) from the Add In and it's definitely present.
 
Ultimately I also want to populate other fields, such as Date, but let's not try to run too soon.
The code is as follows:
Code: [Select]
   Function EA_OnPostNewElement(ByVal Repository As EA.Repository, ByVal Info As EA.EventProperties) As Object

        Dim intPointer As Integer
        Dim objElement As Object
        Dim objTaggedValue As Object
        Dim strReport As String
        Dim strNumericOnly As String
        Dim strTodaysDate As String = String.Format("{0:dd/MM/yyyy}", DateTime.Now)
        Dim strUser As String = Environment.UserName
        Dim nonAlphaChars As New System.Text.RegularExpressions.Regex("[^0-9]")

        strReport = EventPropertiesToString(Info) 'get the element ID
        strNumericOnly = nonAlphaChars.Replace(strReport, String.Empty) 'remove all non numeric characters
        intPointer = CInt(strNumericOnly) 'and ensure that it's an integer

        objElement = Repository.GetElementByID(intPointer)
        'MsgBox(objElement.Name) this instruction used to prove that the appropriate element can be found
        'in the repository

        'For Each objTaggedValue In objElement.TaggedValues
        '    MsgBox(objTaggedValue.Name)
        'Next
        objElement.TaggedValues.Analyst = strUser

        EA_OnPostNewElement = Nothing
    End Function

I also want to do a simple check to ensure that an 'empty' Tagged Value is present in the collection for each element, and if not then add it, so I'd be most grateful for a clue how to do that.

I found the following from a Sparx publication to create a new Tagged Value but I was again getting error messages, and I'm uncertain whether AddNew is applicable to Tagged Value collections...

(I assume that 'Appended' is the Name of the Tagged Value, and 'Change' is the desired value, but maybe I've misunderstood the intent)

Code: [Select]
'TaggedValues
o = element.TaggedValues.AddNew("Appended","Change")
If not o.Update Then
Console.WriteLine("TaggedValues error:" + o.GetLastError())
End if
element.TaggedValues.Refresh
For idx = 0 to element.TaggedValues.Count -1
o = element.TaggedValues.GetAt(idx)
Console.WriteLine(o.Name)
If(o.Name="Appended") Then
If bDel Then element.TaggedValues.Delete (idx)
End if
Next

Many thanks in advance for any help received.

10
Another week… another request for help, please:

I’ve got my MDG working happily, now including dynamic toolboxes, but the users of the target model have expressed a need to apply what I’ll describe as a ‘Reviewer Comment’ anywhere around the model.

I’ve set up a ‘Reviewer Comment’ stereotype, complete with tagged values (initiator, date, status etc) and a defined colour scheme to differentiate it from the remainder of the real model.

I’ve also set up a ‘Relates To’ stereotypical association (one comment to one-to-many elements)

I’ve added a Search Function that can trawl the model for all Reviewer Comments and display these as a table together with the model elements to which they apply.

What I would like to do is add two enhancements to the MDG:
1)      Whenever a Reviewer Comment is created I would like the Auto Name Counter to add a unique sequential reference number prefix e.g. RC01, RC02 etc to the name of the Comment. I can make this work in a target model, but can’t figure out how to define it as part of the MDG so that it is automatically applied.

2)      Once a Reviewer Comment has been associated with an element on one diagram, I would like the same (i.e. linked) Reviewer Comment to be added to any other diagram in which the target element appears. This avoids the risk of duplication that another reviewer will innocently add a similar/same comment.

Any tips/suggestions on how to achieve these features would be greatly appreciated.

11
I have now got my MDG working properly in all but one respect:

It was my understanding that having defined Diagrams which relate to Toolboxes, which contain Stereotypes, whenever I create a new Diagram the appropriate Toolbox would be automatically opened ready to drag and drop new context specific elements onto the Diagram.

Unfortunately what happens is this:
Add Diagram correctly opens a selection window which contains my MDG name in the “Select From” window, and my ‘special’ Diagrams in the right hand “Diagram Types” window.
Selection of a Diagram Type causes the correct empty diagram to be created.
However, the Toolbox contains only the standard toolsets, and to see my ‘special’ Toolboxes I have to select More Tools.

It seems to me that there is a failure of the Diagram to Associate with the Toolbox.

Hardly a show-stopper I’ll admit, but not quite as impressive as having context specific toolboxes.

I have reviewed the properties of each of the Diagram Metaclasses shown on the diagram within the <<Diagram Profile>> to confirm that they have the correct reference to a Toolbox – they do. I’ve also tried to fully qualify the name of the Toolbox, and used it with and without “string” as its type.

I’ve checked Settings>MDG Technologies to ensure that My_MDG is ticked and set to Active.

Interestingly, when one uses the EA built in MDG template to generate the MDG, it comes complete with a few template elements to get one started, but these show the same behaviour as my newly created profiles so I’m wondering whether I’ve got a setting wrong somewhere?

Or, am I expecting too much with context specific toolboxes mapped to diagrams?

Any tips/pointers/corrections would be much appreciated.

12
I am building an MDG in which many element types will be required to change appearance based on the contents of their Tagged Values.

I have successfully written a Shape Script and added it to the profile for each of the stereotypes to which it should apply.

It now seems that if I wish to amend the Shape Script I will need to amend it individually in each Stereotype to which it applies.

This seems counter intuitive: surely there is a 'script once, use many' alternative?

By this I mean set the _image and Initial Value to point to where the script is located, rather than Initial Value actually containing the script.

Despite hours searching I can find no mention of anyone doing this.

If anyone knows how to do this I should be hugely grateful...

Pages: [1]