Book a Demo

Author Topic: Using custom templates  (Read 3813 times)

Agamenon

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Do or do not! There's no try...
    • View Profile
Using custom templates
« on: March 08, 2007, 04:58:51 am »
Hi,

I'm using EA trial and I'm triyng to use a template that I create "Class_Teste". Inside I put teh phrase "Teste", and called it before the %ClassBody%, like this:

//Template Class
%ClassNotes%
%PI=" "%
%ClassDeclaration%
%ClassBody%
%Operation_Teste%

But the word "Teste" do not appear in the end of the class.

I'm doing something wrong?


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Using custom templates
« Reply #1 on: March 08, 2007, 01:10:16 pm »
Two things:
1. Custom templates contain a double underscore, you've only used a single underscore.
2. You've created a template "Class__Teste" and trying to call a different template "Operation__Teste".  (Once I add the extra underscore)

Agamenon

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Do or do not! There's no try...
    • View Profile
Re: Using custom templates
« Reply #2 on: March 09, 2007, 05:24:14 am »
Hi Simon,

Was my error indeed. But I have another question: how can I take the project name in the script? I don't found any MACRO to do this. Do you know how?

Thanks a lot.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Using custom templates
« Reply #3 on: March 12, 2007, 01:36:58 pm »
What do you mean project name?

Agamenon

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Do or do not! There's no try...
    • View Profile
Re: Using custom templates
« Reply #4 on: March 13, 2007, 06:09:27 am »
Hi Simon,

When I create a new project in EA he asks me to give a name to the file *.ead. I want to get this name and use it in the script.

Any idea?

Thanks

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Using custom templates
« Reply #5 on: March 13, 2007, 11:53:59 am »
Sorry, it's not accessible unless you want to use EXEC_ADD_IN and Repository.ConnectionString.