9.5. Accessing Images in RTF Properties

You can use the firstPictureAsImage() service to extract images from RTF properties in tables.

To extract the first image in an RTF profile property, use the firstPictureAsImage() service. Note that the RTF profile property must be created in dev mode (start medini analyze using the - dev parameter). The property can then be used in normal mode. You can copy and paste an image into the RTF property.

The following example shows how to populate a table with some information, including an image, from a HARA table. Note that user_scenario is the name of the RTF profile property. The table lists each scenario's ID, the location where the scenario takes place, and the corresponding image, fitted to 100x100.

Example

{ m:for he | analysis.hazardElements }

{ m:he.id }{ m:he.opSituation. ISO26262_location }{ m:he.user_scenario. firstPictureAsImage(). fit(100,100) }

{ m:endfor }