![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Determine OLE file type? Topic Summary: Created On: 10-Feb-2005 22:19 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The attached function will return the class of the first OLE of the passed in attribute. Perhaps you can base your actions on this class type. The technique may be extended to handle objects with multiple OLEs. The code shows an example of usage on the "Object Text" of the current object. | |
![]() |
|
I am working on exporting from DOORS, and need to be able to tell what type of file an embedded OLE is. If it is any type of image file, I want to paste it into Word as a PNG (using Paste Special...). But if it's an embedded file (Visio for example) I need to do a regular paste instead of a paste special. I have not found any way to determine the file type of an OLE. For embedded pictures, the DOORS built-in function works to determine file type, but nothing for OLEs.
Thanks! Shawn ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
Snap.
I have just been struggling with the same problem. I spoke to Telelogic support and they told me that DOORS does not store any information about the OLE so there is no way to find out what the supporting application is. My interim solution was to store the name of the supporting application in an attribute. This means that I can only have one OLE per object, but it does allow my exporter to run smoothly. I toyed with the idea of activating the OLE and then looking to see what application had been launched using oleGetAutoObject(). This worked, but I didn't like doing things this way because it relies on the user not having any applications running when they do the export. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
The attached function will return the class of the first OLE of the passed in attribute. Perhaps you can base your actions on this class type. The technique may be extended to handle objects with multiple OLEs.
The code shows an example of usage on the "Object Text" of the current object. Edited: 11-Feb-2005 at 11:47 by Antonio Norkus |
|
![]() |
|
![]() |
|
Thankyou Antonio.
You have saved me a lot of hard work. Why didn't I think of looking there? I can now rewrite my exporter to use this information. Now why couldn't doors support tell me that! ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
I'd recommend using a Buffer instead of string to hold the results of the call to richTextWithOle, or you will see your memory usage increasing very rapidly.
All the regexp functions should work on buffers as well as strings. |
|
![]() |
|
![]() |
|
Thank you Antonio!
Attached is some modified code to use Buffers instead of strings, and to check for windows meta files, which do not have an objclass associated with them. ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Determine OLE file type?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.