Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: OLE Objects to File
Topic Summary:
Created On: 1-Aug-2003 09:28
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 1-Aug-2003 09:28
User is offline View Users Profile Print this message


Stefan Doktor

Posts: 2
Joined: 22-Oct-2002

Hi

we plan to add OLE object support to our XML Export.
For this i need to save OLE objects to a File to reference them from the XML.

Is there a general way to export OLE Objects from Doors to File ?

Stefan Doktor
DaimlerChrysler AG
Report this to a Moderator Report this to a Moderator
 1-Aug-2003 13:09
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I have also written an XML Exporter.
The following example demonstrates how I export pictures.

This example only exports the first OLE if there are more than one.





-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 1-Aug-2003 at 13:10 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 4-Aug-2003 09:58
User is offline View Users Profile Print this message


Stefan Doktor

Posts: 2
Joined: 22-Oct-2002

Thx for your help.

This seem to work only for pictures. Any way to do this for all kinds of Ole-Objects ?
We often use excel or visio data as OLE Objects but it seems "exportPicture"
is the only way to export a Ole Object to a file.

Stefan Doktor
Report this to a Moderator Report this to a Moderator
 4-Aug-2003 22:53
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

DOORS 6.0sr1. I did some work exporting OLE diagrams. Below are some snipettes of code that worked but you'll have to adjust it to make it work for you

//-----------------
EmbeddedOleObject eooSrc = null
string TextSrcLong = richTextWithOle(obj."Object Text")
RichText rtSrc
for rtSrc in TextSrcLong do
{ if (!rtSrc.isOle) continue // ignore this non-OLE RichText chunk in TextSrcLong
eooSrc = rtSrc.getEmbeddedOle // Get the OLE part of this RT chunk
exportPicture(eooSrc, "c:/Doors/eooSrc.png", formatPNG)
} // end for each RT chunk in the Text
//-----------------


Note that the RT text may have several OLE diagrams in it. You'll need to build separate file names for each, possibly having a counter and using the counter in the file name. There was some problems using formatts other than "PNG" but I don't recall what they were.

I would like to point out that the exported picture was IDENTICAL to the internal DOORS file that houses the OLE diagram, which I found browsing the DOORS file system.

- Loie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.