Author Topic: Setting source file for code generation via script  (Read 3011 times)

Andor Patho

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Setting source file for code generation via script
« on: February 27, 2013, 09:12:22 pm »
Hello,

is it possible to access the target source file for code generation of a class via scripting? I'm trying to create a tool that would allow to find broken links to source files (e.g. file was moved to a new location in the source tree) and ideally also allow to update them without the need to set the new path for each class one by one via the GUI.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Setting source file for code generation via sc
« Reply #1 on: February 28, 2013, 03:30:04 am »
EaElement:
string GenFile — The Filename property value. The file associated with this element for code generation and synchronization purposes; can include macro expansion tags for local conversion to full path.

q.

Andor Patho

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Setting source file for code generation via sc
« Reply #2 on: February 28, 2013, 08:31:50 pm »
Thank you, can't believe I missed that.

Couldn't figure out how to access the filesystem from script (or if it is even possible), but could make it work easily in a C# addin.

Andor Patho

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Setting source file for code generation via sc
« Reply #3 on: March 01, 2013, 02:19:04 am »
Actually I have one followup question:
Is it possible to resolve an ID set in local paths to it's value via the EA interface in an addin? Or at least get the list of defined local paths so I can resolve the ID manually?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Setting source file for code generation via sc
« Reply #4 on: March 01, 2013, 03:57:41 am »
Look into %APPDATA%\Sparx Systems\EA\paths.txt

q.