![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Problems with olePaste? Topic Summary: Created On: 3-Aug-2004 19:12 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Problems with olePaste?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.