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: Converting richText attribute to a string
Topic Summary: Any examples of string stringOf(richText(string s))??
Created On: 30-May-2006 16:36
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 Heather Linsk, on Tuesday, May 30, 2006 6:41 PM

Answer:
Good point.

Thanks!
 30-May-2006 16:36
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

I can't seem to get the stringOf(richText(string s)) to work for me.

Does anyone have any examples?

My specific issue is that I have a richText Object Text that I am trying to write to a csv file and I am getting the rich text formatting along with my object text. 

How do I strip the rtf formatting and just get my object text as a string?

TIA!

Heather.



-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
Report this to a Moderator Report this to a Moderator
 30-May-2006 16:52
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Easiest way is not use the richText

use something like:

string s = obj."Object Text" ""

Then there is no richtext in the string s.
Report this to a Moderator Report this to a Moderator
 30-May-2006 17:07
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

I thought of that.  However - the reason I used the probeRich was to avoid having to write error checking code to see if the attribute value existed.

Is there another way?  Or am I stuck writing the error checking piece?

Thanks.

-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
Report this to a Moderator Report this to a Moderator
 30-May-2006 17:30
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

The attribute Object Text always exists.

But if you are concerned about other text attributes use:

string s = probeAttr_(obj,"Object Text")

This will give you a text string even if the attribute doesn't exist (ie., the string will be ="".)
Report this to a Moderator Report this to a Moderator
 30-May-2006 18:41
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

Answer Answer
Good point.

Thanks!

-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
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.