Author Topic: Child elements with document script  (Read 749 times)

Hurra

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Child elements with document script
« on: November 28, 2017, 01:20:43 am »
Hello!

I use a document script to send elements to the document generator. In my template I have Child Elements ticked.

However no child elements are reported. I tried to send the child elements to the report through the document script as well but it just report it as regular elements, not as child elements to the element in focus.

Any idea what's going on?

Thanks!
always learning!

Hurra

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Child elements with document script
« Reply #1 on: November 28, 2017, 02:02:32 am »
If I use the same template directly on an element (without document script) it works like a charm.

With document script, nothing in child elements.

Bug or do I have the wrong approach?
always learning!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Child elements with document script
« Reply #2 on: November 28, 2017, 04:10:34 pm »
That is indeed how it seems to work.
Whether it is a bug or a "feature" I leave in the middle.

Geert

Hurra

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Child elements with document script
« Reply #3 on: April 25, 2018, 06:11:23 pm »
Hello, I'm gonna bump my old thread.

I documented the children by adding a fragment in the template, which works fine.

However, I moved the elements containing the children to another package, and then the children stopped appearing in the report. I don't understand why since I find the parent through a script, and send to documentation. The position in project browser shouldn't matter?

The package added to the model document contains my "main element". This package has a sub-package. Only if the elements which has children are in this sub-package the children are documented, otherwise not.

Sketch of document generator:


I hope someone understands what I'm trying to say!

Cheers,

Robert.
always learning!

Nizam

  • EA User
  • **
  • Posts: 279
  • Karma: +8/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Child elements with document script
« Reply #4 on: April 25, 2018, 10:41:43 pm »
You are fetching the parent element through script, and AFAIK EA does not handle child elements outside the context package.

However I've used 'Document Scripts' as a way to addess these usecases, and have found it quite handy.