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: Problems with olePaste?
Topic Summary:
Created On: 3-Aug-2004 19:12
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.
 3-Aug-2004 19:12
User is offline View Users Profile Print this message


Spiros Kikidis

Posts: 3
Joined: 30-Jan-2003

Hi,

I encountered a stange problem while using the oleCopy and olePaste commands when I copy objects from one module to another via DXL code.

In one server (running DOORS v5.2) the script works fine where in another it either copies only
one or two random OLE objects or none. The most bizzare thing is that if I add a print statement
just before the execution of the olePaste command it works fine!

Any ideas why is the different behavior between the servers and what difference the print statement makes so that the olePaste command succeeds?


Thanks
Spiros Kikidis



-------------------------
Spyros Kikidis
spyridon.kikidis@fr.thalesgroup.com
Report this to a Moderator Report this to a Moderator
 4-Aug-2004 15:22
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Just guessing.

OLEs are completely different from v5 compared to v6/v7. In v5 there is the notion of "THE ole in the object"; so commands like "oleCopy(obj)" and "olePaste(obj)" make sense conceptionaly: copy or paste "the" OLE in the object. In v6/v7 this notion of "the" ole no longer exists since oles are embedded in the text and an object can have LOTS of ole diagrams. Thus, oleCopy(obj) should NOT be allowed in v6/v7 but it is. What that command will do is anybody's guess; my guess is it finds the first ole in the Object text. Where "olePaste(obj)" puts the ole is anybody's guess; my guess is it puts it at the end of the Object Text. I also guess that olePaste may not work well for objects already containing complicated RichText such as other OLEs; or if the system attribute "OLE" or "Picture" is already true for that object. I had some luck once manipulating OLEs in v6 but don't recall the details and am sure I did not have complete success.

As for the print statement: I've seen flakey stuff like this before. Be sure to issue these commands real cleanly:
bool CopyIsOk, PasteIsOK
CopyIsOK = oleCopy(obj1)
if (CopyIsOK) PasteIsOK = olePaste(obj2).

You may get problems if you just:
oleCopy(obj1)
olePaste(obj2).

- Louie
Report this to a Moderator Report this to a Moderator
 4-Aug-2004 23:23
User is offline View Users Profile Print this message


Spiros Kikidis

Posts: 3
Joined: 30-Jan-2003

Hi Louie,

Thanks for your reply, well I have encountered the problem you describing in DOORS 7 (with pictures as OLE objects) but it was easier to resolve it as Telelogic made also available some new functions. However in DOORS 5.2 I still have the problem and my solution currently is based on the execution of the print command before pasting the copied OLE object.

Something that I am suspicious about is the behavior of the system clipboard (which I think that DOORS utilise when using the oleCopy and olePaste commands) and I wonder if the settings at each server can affect that behaviour, any ideas if that is possible (I am getting desperate now as I am running out of ideas!)?



-------------------------
Spyros Kikidis
spyridon.kikidis@fr.thalesgroup.com
Report this to a Moderator Report this to a Moderator
 5-Aug-2004 14:24
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Just guessing, but maybe your oleCopy hasn't had time to GET to the clipboard before you issue the olePaste; at least as my ignorance of multi-tasking operating systems suggests. Would it work if you issued an empty "print" statement? Does that bring up an empty DXL window? Pehaps you could just open/close some file to waste time waiting for the clipboard to update.

Try doing something other than print to see if it works.

- Louie

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.