![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Missing elements in Object Text Topic Summary: Object Copying Created On: 28-Jan-2009 11:31 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Hi Mark, Sorry, my mistake. Where I told you to write richTextWithOle in the last post, it should have been just richText. So the line becomes: newObject."Object Text" = richText newrqm Paul | |
![]() |
|
Hi All,
I have a script which appies a user defined filter to a parent module and then copies the selected objects to a new module. I have utilised skip lists to manage the selected objects for insertion into the new module. This is working well however I have discovered that if the Object text contains an embedded formula or diagram then that element is not visible in the target object If the copy function is used to copy the object to a new module manually all data is visible. If the object text is cut and pasted into the target object the data is visible. Is it possible that by putting the source object text into a string before assigning to the new object that the embedded information is lost? Fragments of the script are attached. Thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
My initial thoughts would be that fullList = obj."Object Text" does not return the OLE part of the text (so it returns a blank, then loading this into a skip list will mean that all OLEs will be put in the same key). If this is the case, try replacing the line fullList = obj."ObjectText" with fullList = probeRichAttr_(o, "Object Text", true) This will ensure that the OLEs are preserved in the string. Let me know if this helps. Paul |
|
![]() |
|
![]() |
|
Hi Paul,
Thanks for the quick response. I believe that you are right in that the OLE part of the text is being ignored. I have confirned this by running a quick script within a module assigning the current object text to a string and simply prrinting the string. The OLE data is missing. I have tried utilising your probeRichAttr_ perm but the DXL editor reports 'incorrect arguments for functopn (probeRichAttr_) and incorrectly concatentated tokens for the same expression. I've tried with and without the boolean perm. The DXL manual has very little on this function. Another undocumented feature??? Regards Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
probeRichAttr_ is another undocumented perm, the bool at the end is supposed to mean that OLEs are included. I don't understand why it doesn't work though, what version of DOORs are you using? It can be replaced using the following: fullList = richTextWithOle obj."Object Text" Regards, Paul |
|
![]() |
|
![]() |
|
Hi
You could also try: string s = richTextWithOle(o."Object Text") /Anders |
|
![]() |
|
![]() |
|
Chaps,
I'm using DOORS 8.3. Tried the richTextWithOle and am now getting this jumble in the copied object. The OLE is a microsoft equation 3.0 item. {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} \viewkind4\uc1\pard\f0\fs20 2.18.10.2.2.1\tab The allowable level (surface) position error in either relative or geodetic coordinates shall not exceed the one-sigma ellipse defined by the following mean-square-error matrix. This allowable error matrix is the sum of the following three terms:\par \pard\li720 a.\tab The available positioning quality (APQg for geodetic positioning and APQr for relative positioning) determined by the arriving PPLI message population as follows:\par {\object\objemb{\*\objclass Equation.3}\objw4220\objh400{\*\objdata 01050000 02000000 0b000000 4571756174696f6e2e3300 00000000 00000000 00120000 d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000 0000000000010000000100000000000000001000000200000001000000feffffff000000000000 0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff Thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
All of that extra text is what you get when you convert a rich text string into a standard string. I believe the problem is that your copy function is still transfering the plain text version of the object text. Try replacing the line string newrqm = obj."Object Text" with string newrqm = richTextWithOle obj."Object Text" If that doesn't do it, then I will need to see more of your code. Paul |
|
![]() |
|
![]() |
|
Hi Paul,
I replaced the expression string newrqm = richTextWithOle obj."Object Text" in the code which generated the addition jumble. I've attached the guts of the copy function Thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
Replace the line newObject."Object Text" = newrqm with newObject."Object Text" = richTextWithOle newrqm (There are 2 of these lines in your code) Using the richTextWithOle function when reading the attribute escaps the Rich Text tags once, but assigning it to a string 'un escapes' them again, so to set the attribute value, you need to escape the tags again. Regards, Paul |
|
![]() |
|
![]() |
|
Thanks for your perseverance Paul,
By replacing the suggested lines and including the richTextWithOle in the newObject."Object Text" assignment, the Object Text is blank on all copied objects. One step forward and two back! Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
Sorry, my mistake. Where I told you to write richTextWithOle in the last post, it should have been just richText. So the line becomes: newObject."Object Text" = richText newrqm Paul |
|
![]() |
|
![]() |
|
richTextWithOle can't be use to set attribute, only to extract.
right syntax is : string s = richTextWithOle oldObject."Object Text" newObject."Object Text" = richText s Be carefull with "richText" as three perms exist: string richText (Attr_ ) Attr_ richText (string ) string richText (string ) with three completely different meaning. ------------------------- E. Piallat CeBeNetwork |
|
![]() |
|
![]() |
|
Thank you all for your great assistance.
The copied objects now have the OLE information. All I need to do now is ensure that the OLE data is diaplayed within a richText DBE. As a DXL newbie of approx 4 months I've come a long way with the support of this forum. But there is much more to learn. Thanks again Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Ok,
Why not just use: set(trg."Object Text", src."Object Text") ???? Octavian |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Missing elements in Object Text
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.