I've already looked at this Labs project: GitHub - ArasLabs/content-generator-samples: This project contains code snippets to demonstrate how to create and manipulate content in Aras Technical Documents. and also in the documentation, but can't see the proper commands for Section or Chapter.
Basically I'm looking for the proper content generator code to:
- Create a section or chapter with the title pre-filled out (such as "Introduction")
- Create a sub-section or sub-chapter below the above (after the pre-filled out content).
This:
DocumentSchemaElement sectionElement = (DocumentSchemaElement) this.Factory.NewElement("Section") ;
sectionElement.AddChild(this.Factory.NewText("Title","Introduction"));
targetElement.AddChild(sectionElement);
Sort of works. It creates a section, but it doesn't fill out the Title of the section, it fills it as a child.
Does anyone have any guidance on this? Thanks in advance!!