TDF - Change an Element to Different Schema Type (Text > Heading)
Hello All, Has anyone come up with an easy way to convert one DocumentSchemaElement into another one? We are dealing with importing Word documents into Tech Docs and rather than trying to hard-code in all the possible different style scenarios we're looking at some sort of CUI element to click a document node and then convert it to something else. Examples: Text to a Chapter or Section Text to a List Item There's a 'Replace Item' OOTB action, but I'm just curious if anyone has looked at swapping an element type. Example from OOTB below. Thanks in advance!19Views0likes0CommentsTDF / Tech Docs: DocumentSchemaElement for Section from Content Generator?
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!!369Views0likes3CommentsTechDocs Content Generator - how to add TOC-Section content automatically?
Hi community, I want to use a TechDoc Content Generator Method so I can automatically fill the TOC-Section title according to the target language (de/en). In addition I also want to add the element 'TOC' automatically. As soon as users add a new TOC-Section, they shall get the following view. Unfortunately I right now struggle with both the multilingual title and the 'TOC' element.. My idea was to use something like this: //MethodTemplateName=CSharp:Aras.TDF.ContentGenerator(Strict); if (/* document language is German */) { // Add German title targetElement.AddChild(this.Factory.NewText("Title", "Inhaltsverzeichnis")); } else if (/* document language is English */) { // Add English title targetElement.AddChild(this.Factory.NewText("Title", "Table Of Contents")); } // Add TOC element targetElement.AddChild(this.Factory.New????("TOC")); // what do I have to use here? Would be cool if someone know how to use the ContentGenerator for this purpose. This way all kind of default elements could be automatically filled with default values. Thanks for any hints! Angela5.1KViews0likes3Comments