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: Retrieving OLE Obj. from atribute (column)
Topic Summary: How to take file embedded in an object out of DOORS?
Created On: 23-Jun-2006 12:10
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.
 23-Jun-2006 12:10
User is offline View Users Profile Print this message


Dawid Ligus

Posts: 6
Joined: 13-Apr-2006

Hi all,

I have a column in module where are stored embedded txt files. And I want to get them outside DOORS with original name. They should be stored in previously specified directory. Does anyone have a clue how to do it? At this stage I ended with oleCopy(Object, column, index) function copying OLE object to Windows clipboard. Then DXL produces javascript file which is run with WSH and pastes retrieved file to the directory. Javascript is deleted after module(s) is/are searched through. It's annoying but necessary since I need to have script working on many PCs and it should be universal. I assume all DOORS clients run on Windows XP.
Is it possible using only DXL commands?
Thanks for any new ideas,
Dawid
Report this to a Moderator Report this to a Moderator
 23-Jun-2006 16:08
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Example 2 in the 'OLE Information Functions' section in DXL manual chapter 'OLE objects' gets an OLE and writes it to a file.

- Louie
Report this to a Moderator Report this to a Moderator
 29-Jun-2006 13:42
User is offline View Users Profile Print this message


Dawid Ligus

Posts: 6
Joined: 13-Apr-2006

Right, but it works only with pictures. What I have is txt file pasted to a DOORS object as an OLE. is there something similar to exportPicture, but working with all file types?
Dawid
Report this to a Moderator Report this to a Moderator
 29-Jun-2006 16:01
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Could you solve your problem by including the text in a text attribute & the fullname of the file in a second separate attribute.

Then write a dxl that will take text out of one attribute and save the text in the location given by the second attribute.
Report this to a Moderator Report this to a Moderator
 30-Jun-2006 09:56
User is offline View Users Profile Print this message


Dawid Ligus

Posts: 6
Joined: 13-Apr-2006

Yes, this might be a solution. But, I've written so far DXL which takes those files from hard drive and saves them as OLE in an attribute. Example code:

if (exists(attribute(atrName)))   //if given attribute found
{
oleInsert(o, file, true)    //place file 'nameCase' into object o as OLE object (visible as icon)
oleCut(o)   //cut previously inserted object to clipboard
o.atrName = richClip  //insert clipboard data (with OLE objects) to specified attribute in the same object
clipClear(true) //clear clipboard
}

It's rather easy this way, but now I want them to be exported out of DOORS and it's getting harder - there is simply no function which can do that.
If I store *.txt inside attribute as text then the objects will expand (files are around 5 kB), which is not nice when looking to the DOORS module (data from *.txt should be accessible easily).
Report this to a Moderator Report this to a Moderator
 30-Jun-2006 13:17
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

If text files are stored as ole files-- objects will increase in size more than the size of the text file.

A script can be written to read the file and populate both text attributes.


It is not immediate obvious what benefits you are gaining from your approach.
Report this to a Moderator Report this to a Moderator
 30-Jun-2006 14:31
User is offline View Users Profile Print this message


Dawid Ligus

Posts: 6
Joined: 13-Apr-2006

By expanding I ment height of the object (remember that files are stored in column, so width is not large) :-) Sorry. By the size of file I wanted to indicate that there are many lines. If files are stored as OLE object everything looks nice and file can be activated by doubleclicking on it. But if I fail with my solution I probably use Your proposal, It's good.
Dawid

Report this to a Moderator Report this to a Moderator
 30-Jun-2006 15:59
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Another approach may be to put your text files on a common server and the use hyper links to the files.

For more info, in help files search for: Inserting URLs
Report this to a Moderator Report this to a Moderator
 3-Jul-2006 08:55
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Have you considered using descriptive modules to hold your text files?

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Jul-2006 14:51
User is offline View Users Profile Print this message


Dawid Ligus

Posts: 6
Joined: 13-Apr-2006

Hi,

thans for answers. If it goes to dedicated server and URLs, I can't make it. We do not have global server (different than DOORS database) and it is very useful to have those files in DOORS. User can access files, and even modify - everything will be saved.
Descriptive files are rather strange to me. Information is not editable, they will also create some confusion in project folders and I suppose maintaining those files will be more difficult.
Anyway, the procedure I mentioned at the beginning of the thread (putting files in appropriate column in view as OLE object and extracting to Operating System) is quite easy when done manually, so if DXL was ment for automation why can't I do the same using DXL commands? ;-)
Dawid
Report this to a Moderator Report this to a Moderator
 5-Jul-2006 15:33
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

I wish you much luck in finding a dxl function that open the ole object.

I haven't seen such a function in the dxl help file or the undocument dxl forum thread or the DOORS binary.

You might get with telelogic to see if there is an undocument dxl fuction or find out if the function is implemented in c.
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.