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: problem with richTextNoOle
Topic Summary:
Created On: 29-Jun-2003 03:23
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 Michael Sutherland, on Monday, June 30, 2003 7:32 AM

Answer:
Pelp,

Change the following line:

o."Object Text" = "NUMBER [" o."Absolute Number" "]" ": " trash ""

to:

o."Object Text" = richText( "NUMBER [" o."Absolute Number" "]" ": " rich_text "" )

so that the rich text string is converted to rich text before assigning it back to the attribute.
 29-Jun-2003 03:23
User is offline View Users Profile Print this message


Pelp  

Posts: 11
Joined: 9-Apr-2003

Hi,

I wrote a short script below that appends the Absolute Number of an object as a prefix in the Object Text field.

--

Object o

for o in current Module do{

if (o."object Type" "" == "Requirement" )

{

string trash = o."Object Text" ""

o."Object Text" = "NUMBER [" o."Absolute Number" "]" ": " trash ""

}

}

--

However, with running the above code, it doesn't capture or save the rich text that may appear in the Object Text attribute. I was looking through the DXL manual and came across richTextNoOle. Can this function be used to capture the rich text that appears in this field? If so, how can I use the function. I'm confused of how to use it.

Thx, and sorry for my bad english.

-------------------------
Report this to a Moderator Report this to a Moderator
 29-Jun-2003 17:44
User is offline View Users Profile Print this message


Pelp  

Posts: 11
Joined: 9-Apr-2003

Okay, I have figured out how to use richTextNoOle. Below is the updated code.

--

pragma runLim,0 // Infinite loops

Object o

for o in current Module do{

if (o."object Type""" == "Requirement" )

{

string rich_text = ""

rich_text = richTextNoOle(o."Object Text")

o."Object Text" = "NUMBER [" o."Absolute Number" "]" ": " rich_text""

}

}

--

However, when I run the above code, I still don't recieve my desired results.

Below is how the paritcular objects appears before and after the above code is run in a module.


Before


I went to the store today.


After

NUMBER [154]: {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fprq1\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}} \viewkind4\uc1\pard\lang1033\f0\fs20 I went \ul to the store \ul today.


What am I doing wrong??

-------------------------
Report this to a Moderator Report this to a Moderator
 29-Jun-2003 23:37
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Answer Answer
Pelp,

Change the following line:

o."Object Text" = "NUMBER [" o."Absolute Number" "]" ": " trash ""

to:

o."Object Text" = richText( "NUMBER [" o."Absolute Number" "]" ": " rich_text "" )

so that the rich text string is converted to rich text before assigning it back to the attribute.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 30-Jun-2003 07:41
User is offline View Users Profile Print this message


Pelp  

Posts: 11
Joined: 9-Apr-2003

Thanks Mike!

-------------------------


Edited: 30-Jun-2003 at 07:42 by Pelp  
Report this to a Moderator Report this to a Moderator
 30-Jun-2003 18:05
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I think you want to use "richTextWithOle" to insure you get the rich text and the embedded OLE diagrams.
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.