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

Pages: 1 [2] 3
16
I use alias as an alternative name, where appropriate. A short name or acronym. This is something I have "always" done. Long before i heard of Sparx.
I would think this is what Sparx developers also had in mind, as there is a diagram option to show alias instead of name on shapes. (If an alias is defined.)

But now for a follow up question to my original ask.
How does one set a tagged value for a datatype, in a script?
I can do it manually. No problem! I tried on a datatype that was imported with the Sparx built in XML import. Just went to the Tags tab and created a new one.
But no matter how much I search I can't figure out how to do it in a script. There is no TaggedValues collection for class Datatype. How is it done?

Thanks,
Håkan Lidström

17
Thank you all for your insights. I will try the tagged value route. and in reply to Uffe. I did look at Data Miner, but I would still need to keep track of external UUID and still have to define the import logic, so encouraged by Geert I opted for just plain scripting.
I can add that I found the Sparx-provided XML helper functions in EAScriptLib.VBScript-XML useful. (Though I found a little bug and had to make my own copy for now. I did report it.)

However, I would like to nag Sparx some. It should not be hard to find out your thoughts behind a construct, such as, an element attribute. I tried, I really did, but could not find any hint on the purpose of the 'Keywords' attribute.

Thank you all!
Håkan

18
I know it works, technically, but is it a good idea?

I need to refresh a reference copy of model elements created in a different tool and I intend to do so with a script. The script will need the external UUID to match what’s in the import file with what is already in the Sparx model. I don’t feel ready to start changing the metamodel and add an External UUID attribute, so I thought – We aren’t using the Keywords attribute for anything. Maybe that's a decent place to store the external UUID? Then it occurred to me that I really don’t know what the Keywords attribute is intended for and how to use it. I was unable to find guidance in the help files, so now I turn to the Forum. Will storing UUID in the Keywords attribute for some elements come back to bite me down the road, because I won’t be able to use some Sparx feature I’m not even aware of yet?

Thanks,
Håkan Lidström

19
Duly reported.
And apologies for reporting to the wrong forum. What can I say? I missed the PCS prefix in the forum name.

20
I am pretty sure I found a bug in EAScriptLib.VBScript-XML, function XMLReadXMLFromFile.
What I don’t know is if it has been fixed in a later build than the one I am using.

The bug is on line 70 of EAScriptLib.VBScript-XML, i.e., the last line of function XMLReadXMLFromFile.
 “XMLReadXMLFromFile = xmlDOM”, should be “Set XMLReadXMLFromFile = xmlDOM”

I am using Sparx EA 15.0.1512.

21
Thanks Geert!

I see your point. I would end up writing a script anyhow with the Data Miner approach, so why bother with the overhead?!

/Håkan


22
I am turning to the collective wisdom of the Forum.

My organization has decided on enterprise architecture modeling with TOGAF – ArchiMate – Sparx EA.
My organization already has an established practice of data modeling with IDEFX1 in erwin.

The EA model needs to show how logical data relates to the rest of the EA. Therefore we have a need to import logical data models and show the erwin entities as ArchiMate Data Objects in the EA Model.
What is the best approach to this Extract – Transform – Load (ETL) task?

I am considering the Data Miner feature. It seems to be designed for a need like mine.
I have gotten as far as setting up a data miner model, pointing it to an XMI file generated by erwin and running the default ProcessData script. It lists the XMI file in Session.output. So far so good.

Next step would be to actually do something with the data. I was thinking if I can create packages and classes, same as the built in XMI import does, then I should be well on the way.

Does anyone have a better suggestion than Data Miner for converting erwin entities to ArchiMate Data Objects in Sparx EA?

Thank you,
Håkan Lidström

23
General Board / Words in matrix overlays?
« on: December 13, 2019, 12:20:38 am »
I know how to make an overlay with the UML Type editor, e.g. defining R, A, C, I for a RACI matrix. But is it possible to have a set of words instead of a set of characters? (E.g., Responsible, Accountable, Consulted, Informed.)

I can enter a comma-separated list of words when I define an overlay, but then every character of every word in the list will be accepted when I apply it in the matrix. Am I doing it wrong, or is it just not possible?
I am using Sparx EA 14.
Thanks!
- Håkan

24
We're working on it but we have to live with the shared drive for a while yet.

And yes we take daily backups, after running the integrity test. I cannot stress how important that is.
Thanks,
- Håkan

25
Bugs and Issues / EAPX file too corrupted to open - and how we got it back
« on: November 26, 2019, 11:33:49 pm »
A weird error occurred yesterday and since I couldn’t find anything about it, I want to write down what happened and how it was fixed.

In essence, if an EAPX file is so corrupted Sparx EA can’t open it, try open it with MS Access.


I had been happily modeling for a few hours in our shared EAPX file on a network drive. Let’s call the file our_model.eapx.  Then a coworker also tried to open it.
She got this error message. (Text copied from the dialog box.)

---------------------------
Enterprise Architect
---------------------------
An Error has occurred: Unrecognized database format 'K:\SparxModels\our_model.eapx'.

To enable Jet 4, go to Start | Preferences | Use JET 4.0, restart EA.
---------------------------
[ OK ]
---------------------------


Strange! Jet 4 was the default at install and she had knowingly not changed that.

I was still able to work in the model.

To be sure my coworker launched Sparx EA without opening a model and checked that Jet 4 was still enabled. It was.
She tried to open the model file again, same error.
I asked another coworker to open the model and he got the same error.

I ran a project integrity check and it reported no errors.

I saved my edits and closed Sparx EA, then tried to open again.
Now I too got the error!

Now what? Internet searches return nothing useful. Panic! What to do?

What the heck? It’s an access database. What happens if I open it with MS Access? (Nothing much to lose.)

MS Access shows a message that the file is corrupted and offers to repair it. I take the offer. MS Access churns for a minute or two and opens the file. I immediately close MS Access and tries Sparx EA.
Lo and behold. It works! And as far as I can see, all my recent edits are there.

(The MS Access dialog box did not support copy-paste the way a well written Windows application should and it was rather long so I do not show it here.)

I hope this will be helpful to someone else at some time.
 - Håkan

26
General Board / Re: Relationhip matrix order with custom SQL
« on: November 22, 2019, 06:28:23 am »
I would like to propose an matrix improvement. (Irrespective of SQL)

I'd like to see a Don't Sort option, i.e., just list in the order the elements appear in the browser, with child elements indented.


I would also like to see a Frequency Sort option, i.e. the more relationships, the higher up and further to the left for an element. I have found this very useful in another tool.


Thanks,
- Håkan

27
General Board / Print diagram in Specification Manager view
« on: November 22, 2019, 06:15:16 am »
I have a diagram open. I select Print using any of the ways available to do so.
The diagram graphics are printed. Fine!

Now I right-click on the diagram canvas and pick Open diagram in Specification Manager, and I print again.
The diagram graphics are still printed. Not fine!
I want the Specification Manager text that I see on screen!

It must be possible, but I have searched in vain in the user guide and the Forum.

How do I do it?
Why isn't this a trivial task?

Thanks, Håkan

28
Thanks Geert! That worked like a charm!
(There is so much to learn in Sparx EA)

29
I can't be the first to ask this, but I guess I'm using the wrong search strings.

So I wrote an element script. Works fine when I select an element in the project browser.
However, the script is also available when I right-click on an element shape on a diagram and that has unintended consequences.
Selecting a shape is not the same as selecting the corresponding element in the browser, so how do I test for what I right-clicked on? If I new I could take action and write the code to select the element behind the shape.
I am on Sparx EA 14.

30
Thank you guys.
Move to real DB is in the works. (Just takes a little longer than I would like.) And as Geert says, only unsaved diagram changes are lost. I can confirm.


Pages: 1 [2] 3