Forum Discussion

vriti_steepgraph_com's avatar
1 month ago

Inserting structured Requirement content via API in Aras RE (without UI editor)

I am working on Aras Innovator 28 with Requirements Engineering (RE).

I want to add content to a re_Requirement item programmatically (using AML / server method / API), instead of using the UI editor.By content, I specifically mean structured TDF content, such as:Text blocks, Lists, Tables, Graphics / Images, XML-based document structure used by the Requirement editor

Problem:
Direct AML with <content> XML does not reflect correctly in theeditor
The inserted XML is not interpreted properly by TDF
TDF ViewModel is not accessible from button click / client script

Sample AML:

<AML>

<Item type="re_Requirement" action="add">

<title>Test Requirement</title>

<classification>Requirement</classification>

<content> <![CDATA[ <Requirement xmlns="http://www.aras.com/REStandard" xmlns:aras="http://aras.com/ArasTechDoc">

 

<Text aras:id="1">

<aras:emph>Sample Text</aras:emph>

</Text>

<aras:table aras:id="2">

<Text aras:id="2">

<aras:emph>Cell 1</aras:emph>

</Text>

</aras:td>

</aras:tr>

</aras:table>

</Requirement> ]]></content>

</Item>

</AML>

 

 

 

Questions:
1. What is the correct way to insert structured TDF content (tables, lists, etc.) into re_Requirement via API?

2. Is there a supported way to access or reuse the TDF ViewModel / editor APIs from client-side code?

3. Should content always be generated using SchemaElementFactory instead of raw XML?

Additional Context:
I explored window.techDocContainer, Editor loading via LoadEditorTab event, AddElementAction.jsBut I could not reliably inject content into the editor.

Any guidance or working example would be very helpful.
christopher_gillis​ Gopikrishnan​