Technical Documentation - Content Generator for an Image?

In Tech Docs Content Generator examples, I've run across:

  • this.Factory.NewItemProperty
  • this.Factory.NewText
  • this.Factory.NewTable
  • this.Factory.NewElement

I'm trying to pull a Graphic from another item (requirement) and apply it into the Tech Doc.  I've been able to pull the image ID and can get the content generator to create a graphic placeholder, but I can't figure out the right Factory command to generate a Graphic that's got an ID applied to it.  At the moment it makes a blank block, that you can select a graphic, but then it doesn't save...

The below is nested inside the content generator:

String AML = @"<AML>"
+"<Item type='re_ImageReference' action='get'>"
+" <source_id>" + targetItem.ItemId + "</source_id>"
+" <related_id>"
+" <Item type='tp_image' action='get'/>"
+" </related_id>"

Item reImages = this.Factory.InnovatorInstance.applyAML(AML);
int numImages = reImages.getItemCount();

// Loop through each Catalog Entry and fill the remaining table rows
for(int i=0; i < numImages; i++)
Item reImage = reImages.getItemByIndex(i);
Item imageItem = reImage.getPropertyItem("related_id");
tableElement.GetCell(1, 0).AddChild(this.Factory.NewElement("Graphic"));
} // for() loop over images entries

The highlighted section I'm assuming needs to have some sort of assignment from the Element type (Graphic) to the source ID (imageItem result).

Appreciate any insight on this!  If there's a reference that has all the Factories (for instance lists and other content), that'd be much appreciated!

Parents Reply Children
No Data