![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: problem with richTextNoOle Topic Summary: Created On: 29-Jun-2003 03:23 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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. | |
![]() |
|
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. ------------------------- ![]() ![]() ![]() |
|
![]() |
|
![]() |
|
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?? ------------------------- ![]() ![]() ![]() |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Thanks Mike!
------------------------- ![]() ![]() ![]() Edited: 30-Jun-2003 at 07:42 by Pelp |
|
![]() |
|
![]() |
|
I think you want to use "richTextWithOle" to insure you get the rich text and the embedded OLE diagrams.
|
|
![]() |
Telelogic DOORS
» DXL Exchange
»
problem with richTextNoOle
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.