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 2 [3] 4 5 ... 7
31
General Board / Re: Migration from EA15 to EA16; What do we lose?
« on: July 22, 2022, 06:10:47 pm »
Is it still supposed to be true that 64 bit EA cannot access EAPX files?

I have installed the 64 bit version (build 1605) and can both open and create EAPX files. I'm wondering if will it continue to do so. I want to recommend that we change to EA16, but given that I have in the past found issues in new versions and had to revert to a previous one, don't really want at some point in the near future to be forced to convert project file types.

The release notes for 1605 state "The 64bit Professional edition no longer stops the opening of .EAPX repositories", but I am using the Corporate version.

32
I wanted to include footnotes in generated document fragments but have come up against two issues:
1. If I put "1" (without quotes) on a footnote, all the footnotes have number 1, even if they appear twice in a fragment. I was expecting the output to auto-increment the number.
2. The font of footnotes matches the font of where the footnote is (so a footnote on a heading and a footnote on normal text appear in the footnotes in two different formats!). If I try changing the style of just the superscript number on the heading then the whole heading changes as well as the footnote text.
Unless I have missed something, I think neither issue can be resolved. I'd welcome any suggestions, otherwise I feel the need to raise a feature request.

33
You can script changes, e.g. diagramObject.SetStyleEx("BCol",colourDefault) to set the background colour (just to help I have defined colourDefault as -1 in my code. A positive number will set the colour to the number specified (RGB as a decimal - it's easiest if you create helper functions to the hard work of converting individual RGB values into one number!). So you could colour your elements (and you can also set the colour of connectors) using a script based on other parameters.

You might need to add a custom property (tagged value is probably a good option) to record any non-default colour to return the diagram to previous colours.

34
So Geert's suggestion seems to work - the add-in has to re-read the diagram to pickup changes made when saved, that's perhaps not unreasonable but easy to miss.

However, that introduces (for me) another disadvantage that the diagram modified date is ALWAYS changed. That's a disadvantage as I am auto-incrementing the diagram version if any changes are made (if the user manually saves the diagram then the modified date has changed and if the diagram tab is prefixed with a * then my add-in enforces a save as it knows the diagram is updated but not saved, which also updates the modified date). My decision on whether the diagram has been modified (rather than just opened and closed) is based on the modified date changing.

The step of enforced saving means that opening and closing the diagram causes the version to auto-increment as the modified date is changed.

I tried changing SaveDiagram to the CloseDiagram method but that just resulted in EA closing (I assume crashing - CloseDiagram appears to be incompatible with the EA_OnPostCloseDiagram event.

Unless there is any other method I can use to enforce field entries to be updated, the only alternative I have at the moment is to enforce opening the system output and displaying a message in the state when it is possible that the user has failed to click out of the field entry (I know I could also display a dialog box, but that will become more annoying given that the majority of the time opening and closing a diagram without modification does not merit attention).

35
I thought that was KP's point about checking the Resources window (if I had by mistake importing the MDG then would it not be listed there as a second one?). I also never import the MDG and it's my model. (honestly) I agree there are times when I've done things and forgotten but certain not this time!

36
I have written a model based add-in that interrogates the value of the diagram version on diagram close, using the EA_OnPostCloseDiagram event. If the user has edited the diagram version but NOT clicked out (so the cursor is still active in the version box) then the new value is not picked up with theDiagram.Version (where theDiagram is the current diagram that is being closed), which results in my add-in not working as expected as it does not have what the user thinks is the version number. If the user clicks elsewhere and then closes the diagram the new value is picked up (which means my add-in works as expected).

I've tried adding Repository.SaveDiagram(theDiagram.DiagramID) but even that does not cause the new version to be detected.

Inevitably users will not remember to click out of the box (even I have forgotten and could not initially work out why it was not working a couple of months after writing it). Is there any way that I can force a new entry that has been entered to be picked up within the add-in? I imagine this applies to any text field that is being entered at the time of diagram close so could catch out add-ins written by others as well.

37
KP, No only one listed in either location (and in the Resources view, right-click and locate matches the location defined in the Manage Technologies dialog). I don't import the technology but point EA to a path on a file share.

38
This is a weird one...

I have created an MDG that offers on option of three types of element from a hidden sub-menu (i.e. you drag the element onto the diagram and a menu offers a choice of three types of that element).

I have two different models on a database server. One works perfectly (dropping each of the three stereotypes of my element as selected), but on the other when one of the types is chosen from the hidden sub-menu, what is actually added to the diagram is one of the others with a different stereotype! The other two of the tree types are added correctly.

It also works correctly on an EAPX model (sample of one model).

It seems like something to do with the model is affecting the result of the MDG, which is not really ideal. While this is only a test model (that I use to test my MDG works) I'd like to understand what has caused it, and ideally how it could be fixed. In the medium term I will delete the whole model so that I can test the next version of the MDG, which may or may not resolve it (if there is something in the database then deleting everything from the project browser may not do so). I would try to synchronise the stereotype, but for hidden sub-menus I cannot find a way to do that (right-click on the toolbox does not give the synchronise option).

Has anyone any bright ideas on the cause and/or resolution?

39
General Board / Re: MDG profile for Activity Diagrams
« on: March 29, 2022, 06:31:00 pm »
You could consider using a View Specification to limit the items in the toolbox (and that always gives the expert user the option of switching to a fuller set of tools). It's described in https://sparxsystems.com/resources/user-guides/15.2/modeling/mdg-technologies.pdf from page 63 on. That doesn't require you to redefine any diagrams or tools but to work with the tools available from the standard EA toolboxes (if that is appropriate for you - that obviously won't add the tagged values that you are interested in).

40
Thanks KP. Importing them as patterns works correctly.

41
If I include SysML1.3::quantityKind and SysML1.3::unit in my toolbox definition I am able to include those elements in my custom toolbox, but if I change it to the current SysML1.4:: then it doesn't work. When I drop the unit and quantityKind elements by manually selecting the SysML 1.5 toolbox, it is notable that they do not have any stereotype and likely why my inclusion in a toolbox is failing. So how then do I include the SysML 1.4/1.5 versions of unit and quantityKind elements? I'd prefer to use the latest rather than the retrograde step of using elements from SysML1.3.

I am able to successfully include SysML1.4::ValueType in my custom toolbox.

42
For anyone else finding this, I have now managed to overcome the issue, based on https://sparxsystems.com/forums/smf/index.php/topic,38810.0.html#msg240839.
When creating the document, you need to load a document template, e.g.: reporting.NewDocument("Blank"). The guidance says that the template can be blank (I'd assumed no template quoted between the quotes, but it might also mean an empty template!).
Within the template (I called it Blank), you need to load the Stylesheet that you will be using when adding text. Then the styles specified will be used. For belt and braces, I also have reporting.SetStyleSheetDocument("MyStyleSheet") to ensure that the right style sheet is used.
My suspicion is that this is not how Sparx intended it to work (otherwise I would expect the above to be in the documentation), but this provides a workaround.

43
Did either of you find a resolution? I'm using JScript and finding the same. If I manually update the stylesheet of the generated document afterwards then the script has applied the correct styles to the paragraphs (as those that I want bullets on then get bullets) but I should not need to do that.

44
I am trying to use the DocumentGenerator in a script to generate documents for a Document Script in a document template fragment but it's not working and my Session.Output messages in the script are not appearing. I have a working Custom Script to which I have added some Session.Output messages and they don't appear either! I must be looking in the wrong place (I've tried both the System and Script tabs in the System Output window which is where the script output normally appears from Session.Output messages.

45
OK, but I was trying to get the flow properties compartment to appear on my custom diagram type, not a SysML diagram.

Pages: 1 2 [3] 4 5 ... 7