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: Specifying a tick character in a DXL string
Topic Summary:
Created On: 25-Nov-2004 13:20
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 Tuesday, November 30, 2004 11:14 AM

Answer:
Paul,

Yours didn't work for me without a font table. The following seems to work for me:

displayRich "{\\f1001\\'d6}"
 25-Nov-2004 13:20
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

I want a dxl attribute that displays a tick symbol if a boolean attribute is true.

Inserting a tick symbol into object text and using dxl to get it's integer value, found it to be 214. However the following attribute DXL doesn't work.

if (obj."tickBoolean" == "True") obj.attrDXLName = charOf(214) ""

Looping through all the ASCII char codes, it doesn't seem that a tick is supported.

The only way I've found so far is to get the richText string of the tick and use that, so my code looks like the following:

const string tick = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1036{\\fonttbl{\\f0\\froman\\fprq2\\fcharset2 Symbol;}{\\f1\\fnil\\fcharset0 Times New Roman;}}\n\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs20\\'d6\\lang1036\\f1\\par\n}\n"

if (obj."tickBoolean" "" == "True") obj.attrDXLName = richText tick

The DOORS generated RTF string is a bit of a monster. Does anybody know a better way to define a tick as an RTF string?

Cheers,
Antonio


Edited: 25-Nov-2004 at 17:25 by Antonio Norkus
Report this to a Moderator Report this to a Moderator
 25-Nov-2004 14:16
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

DOORS 5.2 (don't know about later versions) has an "Icon Wizard" under the Tools menu that draws a tick or cross in a layout DXL column depending on the value of a boolean attribute.
Report this to a Moderator Report this to a Moderator
 25-Nov-2004 17:19
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Hi Paul,

didn't think to look there. Thanks. Unfortunately, my users would prefer a blank in the case of a "False" value, which the wizard can't do.

Really, I was wondering whether anyone knew DOORS' rich text markup well enough to define a minimal RTF string that contains a tick symbol, rather that the atrocity that is belched up from DOORS.

Cheers,
Antonio.

Edited: 25-Nov-2004 at 17:20 by Antonio Norkus
Report this to a Moderator Report this to a Moderator
 26-Nov-2004 02:51
User is offline View Users Profile Print this message


werner kolze

Posts: 19
Joined: 30-Oct-2003

Antonio,
the code below will display a tick. Use as you wish, as layout dxl or in a dxl attribute.

cheers, Werner

int i
string test = ""
characterSet(getCanvas, 1, 1, charsetSymbol)
for (i=214; i <215; i++) {
test = test charOf (i) ""
}
draw(getCanvas, 5, 20, test)



-------------------------
werner.kolze@baesystems.com
Report this to a Moderator Report this to a Moderator
 26-Nov-2004 08:28
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

The full specification of RTF is available online at the MSDN Library. (but DOORS supports only a small subset of the full spec)

The following works for me:
const string tick = "{\\f0\\'d6}"
YMMV

Edited: 26-Nov-2004 at 09:11 by Paul Worrall
Report this to a Moderator Report this to a Moderator
 29-Nov-2004 19:27
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Answer Answer
Paul,

Yours didn't work for me without a font table. The following seems to work for me:

displayRich "{\\f1001\\'d6}"

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 30-Nov-2004 11:18
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Hi Michael,

thanks for your answer...the font table was needed for me too.

Thanks Paul and Werner for your responses too.

Best Regards,
Antonio.

Edited: 30-Nov-2004 at 11:19 by Antonio Norkus
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.