Skip to main content
rombanks
Inspiring
March 6, 2016
Question

extracting embedded visio diagrams from FM with ES

  • March 6, 2016
  • 2 replies
  • 1325 views

Hello fellows,

AFAIK, FM15 is not "aware" of the type of the graphic object that sits inside an anchored frame. Embedded graphics appears as OLE2. Is there a way to programmatically extract embedded Visio graphics from Framemaker files and leave all other types of graphics in place?

Thank you for your responses in advance!

This topic has been closed for replies.

2 replies

Participating Frequently
March 7, 2016

No direct experience, but some suggestions:

  • An Inset object has a set-only InsetSaveFacetToFile property. This might do what you need. There's not much documentation for it in the Scripting Guide. I'd start by trying values of "OLE" or "WMF" for the facet name. Other facets might exist as named properties of the Inset, so list all the properties, and examine them.
  • The libraries for the FDK (FrameMaker's C API) expose symbols for functions named F_ApiExport() and F_ApiGetExportDefaultParams(). These are undocumented, but I believe they do the reverse of F_ApiImport() and F_ApiGetImportDefaultParams(). There might be corresponding JavaScript methods: GetExportDefaultParams() is documented, but I don't see any documentation for Export(). Again, these might do what you need, if they exist.

Finally, the FDK documentation sometimes has more informatioin than the Scripting Guide, so might give some further suggestions that can be re-engineered using JavaScript.

rombanks
rombanksAuthor
Inspiring
March 8, 2016

Hi Mike,

Thank you for looking into this issue. Are the embedded figures treated as insets by FrameMaker?

I'll try to play around with these APIs.

Thank you!

Roman

Participating Frequently
March 9, 2016

AFAIK:

  • embedded figures are an Inset object
  • the image data is stored as one or more facets
  • each facet is a named property of an Inset object
  • the name typically represents the format or type of data (e.g. OLE, WMF, PNG).

The above is extrapolated from the C API, with which I am more familiar. But I've not used insets very much, so I'd trust the manuals over anything I say.

frameexpert
Community Expert
Community Expert
March 7, 2016

Hi Roman, What do you mean by extracting the embedded graphics? Thanks. -Rick

www.frameexpert.com
rombanks
rombanksAuthor
Inspiring
March 7, 2016

Hi Rick,

Thank you for your response!

"Embedded" means not linked/imported by reference - just sitting locally in a FM file.

Best regards,

Roman

frameexpert
Community Expert
Community Expert
March 7, 2016

There is no path data stored for embedded graphics that can be retrieved programmatically. So there is no way to convert them to referenced graphics.

www.frameexpert.com