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: Missing elements in Object Text
Topic Summary: Object Copying
Created On: 28-Jan-2009 11:31
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.
Answer This question was answered by Paul Howstan, on Wednesday, January 28, 2009 4:15 PM

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
 28-Jan-2009 11:31
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 12:00
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 12:41
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 12:47
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 12:49
User is offline View Users Profile Print this message


Anders Vestlin

Posts: 11
Joined: 30-Aug-2007

Hi

You could also try:
string s = richTextWithOle(o."Object Text")

/Anders
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 13:22
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 13:35
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 14:00
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 14:40
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 15:28
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 15:44
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Answer 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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 15:46
User is offline View Users Profile Print this message


Eric Piallat

Posts: 33
Joined: 26-Jan-2004

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 16:15
User is offline View Users Profile Print this message


Mark Williamson

Posts: 79
Joined: 12-Sep-2005

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
----------------------------------------
Report this to a Moderator Report this to a Moderator
 28-Jan-2009 16:15
User is offline View Users Profile Print this message


Octavian Stanescu

Posts: 39
Joined: 28-Feb-2005

Ok,
Why not just use: set(trg."Object Text", src."Object Text") ????

Octavian
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.