Book a Demo

Author Topic: path to eapx file  (Read 7972 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
path to eapx file
« on: September 09, 2020, 10:05:30 pm »
There are situations where I do have several UML models open by the same file name, each in its own EA instances.
EA does not show the path to the file in its title line.
What is the easiest way to determine the path to the open eapx file from within EA, in order not to make changes in the wrong model?
Rolf

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: path to eapx file
« Reply #1 on: September 09, 2020, 11:08:02 pm »
Maybe you run a script printing repository.connectionstring

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: path to eapx file
« Reply #2 on: September 09, 2020, 11:32:53 pm »
You can do Save Project As, that will show you the path to your current repository.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: path to eapx file
« Reply #3 on: September 10, 2020, 08:17:42 am »
Hi Rolf,
when I'm in that situation, I use the context menu on the start page hovering over the pinned entry.  "Edit connection details."  If the entry isn't pinned, you can pin it temporarily.

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

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: path to eapx file
« Reply #4 on: September 10, 2020, 11:41:36 am »
You could create an empty diagram with the pathname as its title, and just have that open in the work area so that the tab always shows you where you are.

I don't think I understand why you have the same file name though - can you give an example? I think there might be further options available but I don't know if they would apply within your context.
Best Regards, Roy

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: path to eapx file
« Reply #5 on: September 10, 2020, 05:01:21 pm »
Hello,


Presumably the OP means same base name in different directories. And the simplest way to tell different file-based repositories apart is what qwerty suggested: look in Repository.ConnectionString.
As long as you haven't connected to the same project in one session using drive letters and in another using UNC paths this will show you which is which.

What Paolo suggested, pinning the connection on the start page, then right-clicking and selecting Edit Connection Details, shows this same information.
Clearly it would be better if the connection details could be shown from the Recent list as well. In fact, playing around with it I've spotted several bugs and possible improvements, which I'll write up in a minute.

Anyway, here's a script that does it for you.
Code: (VBScript) [Select]
option explicit

!INC Local Scripts.EAConstants-VBScript

Repository.EnsureOutputVisible("Script")
Session.Output "Current repository:    " & Repository.ConnectionString

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: path to eapx file
« Reply #6 on: September 11, 2020, 05:33:51 am »
Thank you, all - I opted for the script solution.

@Roy: we organize development similar to gitflow branching model. I could have a personnel feature eapx, a development eapx where all personnel feature eapxes get merged back after a formal review, a release eapx once a system gets delivered and a master eapx for the final deliverey of a project. Next master eapx will come with a new contract for a maintenance release or a new project or a new customer.
All expose the same filename in git or svn repository and local checkout.

For merging back features to development to release to master, I am using Lemmontree.

Rolf
Rolf

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: path to eapx file
« Reply #7 on: September 11, 2020, 12:04:22 pm »
So you could use a different Visual Style or Theme to apply different banner/background colours to each model? (Then you would have to know what each colour represents, of course.)
Best Regards, Roy

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: path to eapx file
« Reply #8 on: September 11, 2020, 04:21:17 pm »
Seems to me a very good idea, RoyC: when opening an eapx file I would immediately see on which level I am inspecting the model.

How can I bind the Visual Style to an eapx file?

When I changed it, it is changed for any eapx. Would mean, I cannot distinct the level by the appearance of a certain style. If I would have to change the style anytime I open a model, this would not suffice: too errorprone.

Rolf

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: path to eapx file
« Reply #9 on: September 14, 2020, 02:34:20 pm »
Yeah - actually your script option is the one to use. I have not applied the colour coding method myself, but I followed up with someone who does and I found out they are applying the colour in a shortcut to open EA and then opening the model in that instance of EA. So they open their, say, red instance of EA and always open the debug model in that instance, rather than opening their debug model and it always displays in red. Sorry - it looked simpler than it actually turned out to be.
Best Regards, Roy