Author Topic: Comments in Shapescripts  (Read 12579 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13083
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Comments in Shapescripts
« Reply #15 on: July 01, 2016, 01:17:07 pm »
I've created a new script to extract the shapescripts from MDG files and I've extracted and uploaded all of them to the github library.
Which now contains over 1000 shapescripts with more then 30.000 lines of code. :o

Geert
Hi Geert,
Unfortunately I don't have time to check it out right now - other issues in play.  But can you confirm that you can now reverse engineer an MDG file (not a profile in a repository) and generate text files - to be version controlled.

Paolo
Hi Paolo,

Yes I can, but (currently) I only get the shapesripts out.
The script is uploaded into github: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/ExtractShapescriptsFromMDG.vbs

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8561
  • Karma: +254/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Comments in Shapescripts
« Reply #16 on: July 01, 2016, 04:32:13 pm »
Hi Paolo,

Yes I can, but (currently) I only get the shapesripts out.
The script is uploaded into github: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/ExtractShapescriptsFromMDG.vbs

Geert
Had a  quick look and it's neat!  I can see how it can form the basis of a round-trip mechanism for shape scripts.

I want to maintain shapescripts outside of profiles so that I can manage common script fragments across all scripts.  For example, if a user decides to place a note in a relationship, we think that's important enough to place a decoration on the relationship to that effect.  I want all relationships shapescript to have the same script fragment to do that.  I can maintain that globally outside of a profile and just reverse engineer the updated scripts into the MDG using the opposite to this code.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13083
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Comments in Shapescripts
« Reply #17 on: July 01, 2016, 05:32:11 pm »
Yes, you could do that, but wouldn't it be easier to do that based on the profile in EA?

The first script I wrote extracts the shapescripts from the _image attribute on the stereotype.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8561
  • Karma: +254/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Comments in Shapescripts
« Reply #18 on: July 01, 2016, 06:36:02 pm »
Yes, you could do that, but wouldn't it be easier to do that based on the profile in EA?

The first script I wrote extracts the shapescripts from the _image attribute on the stereotype.

Geert
Yes, it would except I have no profile as yet...  We've been maintaining our MDG file WITHOUT any direct repository support (in the form of a profile) for over a year.  The MDG is currently nearly 1Mb and will shortly go larger.

I might use the reverse engineerer to possible create such a profile.  It's so fast to change the MDG (now that we know exactly what we're doing) that we couldn't justify the manual expense of setting up a profile from scratch.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13083
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Comments in Shapescripts
« Reply #19 on: July 01, 2016, 06:54:52 pm »
Yes, it would except I have no profile as yet...  We've been maintaining our MDG file WITHOUT any direct repository support (in the form of a profile) for over a year.
Wow, that's really hardcore  :o

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8561
  • Karma: +254/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Comments in Shapescripts
« Reply #20 on: July 02, 2016, 11:06:40 am »
Yes, it would except I have no profile as yet...  We've been maintaining our MDG file WITHOUT any direct repository support (in the form of a profile) for over a year.
Wow, that's really hardcore  :o

Geert
Yes, I agree!  8)  We DID start slowly...   A small change here, another there...  But as we got to understand how it works, we became more and more adept and confident.  Now, it's almost second nature...

For example, the recent COMPLETE revamp of the MDG to completely separate it from the previous Sparx ArchiMate MDG was done using only Notepad++ and 1 single stereotype profile (used to manually convert shapescripts and icons - which needed updating (those shapescript fragments I mentioned)).

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!