Book a Demo

Author Topic: Synchronize with code: How to specify filename?  (Read 4285 times)

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Synchronize with code: How to specify filename?
« on: November 09, 2011, 02:20:09 am »
I want to synchronize a class I have originally generated with EA. However, I have since changed the filename.

How do I update the filename in EA, so synchronization works again?

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Synchronize with code: How to specify filename
« Reply #1 on: November 09, 2011, 09:05:04 am »
You can find the filename currently associated with a Class in EA using the Properties window.  (View | Element Properties)

Edit the filename property to match the path of the file you want to synchronize.

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Synchronize with code: How to specify filename
« Reply #2 on: November 09, 2011, 06:44:54 pm »
Quote
You can find the filename currently associated with a Class in EA using the Properties window.  (View | Element Properties)

Edit the filename property to match the path of the file you want to synchronize.

I had already gone through the property dialogue, but had not been able to find the existing (incorrect) filename anywhere.

(EA 9.1)

Can you give me a hint where to look?

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Synchronize with code: How to specify filename
« Reply #3 on: November 10, 2011, 09:28:05 am »
It's in the docked Properties window, not the properties dialog.

From the main menu select - View | Element Properties, or press Alt+1.

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Synchronize with code: How to specify filename
« Reply #4 on: November 10, 2011, 06:12:13 pm »
Yes! Thanks!

Now, is there a way to do a search-and-replace on the Filenames?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Synchronize with code: How to specify filename
« Reply #5 on: November 10, 2011, 06:32:34 pm »
Probably not.
Options are:
- Write a script to search/replace filenames using the API
- Execute an SQL update statement on the database to update the filenames
- Export to XMI, find/replace in a text editor, and import again.

Geert

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Synchronize with code: How to specify filename
« Reply #6 on: November 10, 2011, 06:37:10 pm »
Solved it, using XMI export and import.

I am sure there are cooler ways to do it, but it worked.