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: DXL script to Bold a single word
Topic Summary: How to Bold a requiered single word
Created On: 27-Feb-2007 21:17
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 Jobina Johnson, on Wednesday, February 28, 2007 1:42 PM

Answer:
If this doesn't work for you try this one:

Object o
for o in current Module do {
string sObjText =richText o."Object Text"
sFind = "shall"
int iOffset
int iLen
string sReplace= "{\\b shall}"

if (findRichText(sObjText,sFind, iOffset, iLen, false))
{ string sTemp= sObjText[0:iOffset-1] sReplace sObjText[iOffset+iLen:]
if (isRichText(sTemp))
o."Object Text"=richText(sObjText[0:iOffset-1] sReplace sObjText[iOffset+iLen:])
}
else print "Failed to match\n"
}


REPLACE THE sFind and sReplace with the word you are looking for.
 27-Feb-2007 21:17
User is offline View Users Profile Print this message


Doors Group

Posts: 61
Joined: 31-Jan-2007

This is funny but guys i'm in a time line and i need to find a way to convert a word from normal to bold. The replace button don't allow me to bold. So if someone can help me with a short script because i have 3 documents all with the same problem. And by the way the whole document have the word like 1,000 times. Thanks.
Report this to a Moderator Report this to a Moderator
 27-Feb-2007 21:45
User is offline View Users Profile Print this message


Jobina Johnson

Posts: 55
Joined: 12-Sep-2002

Here is a Kitchen DXL script that uses a GUI to do what you are looking for

applyRT.dxl
applyRT.dxl  (5 KB)
dbs.inc
dbs.inc  (6 KB)



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


jobina.l.johnson@boeing.com
Report this to a Moderator Report this to a Moderator
 27-Feb-2007 21:47
User is offline View Users Profile Print this message


Jobina Johnson

Posts: 55
Joined: 12-Sep-2002

Answer Answer
If this doesn't work for you try this one:

Object o
for o in current Module do {
string sObjText =richText o."Object Text"
sFind = "shall"
int iOffset
int iLen
string sReplace= "{\\b shall}"

if (findRichText(sObjText,sFind, iOffset, iLen, false))
{ string sTemp= sObjText[0:iOffset-1] sReplace sObjText[iOffset+iLen:]
if (isRichText(sTemp))
o."Object Text"=richText(sObjText[0:iOffset-1] sReplace sObjText[iOffset+iLen:])
}
else print "Failed to match\n"
}


REPLACE THE sFind and sReplace with the word you are looking for.

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


jobina.l.johnson@boeing.com

Edited: 27-Feb-2007 at 21:47 by Jobina Johnson
Report this to a Moderator Report this to a Moderator
 28-Feb-2007 13:49
User is offline View Users Profile Print this message


Doors Group

Posts: 61
Joined: 31-Jan-2007

This script is the best. I want to thank you for your help and time. By the way the other script is good but i had problems with the images, because in my work i dont have write access to the DOORS Lib, and when it looks for the images, promt me the error message. But beside that it's good for people who have access to all Doors folders.

Do you have a begginers manual for DXL. I'm having trouble with the reference manual 'cause it's only that, a reference manual. i have the Programmers Guide but some sections are missing.

If you can post something for begginers i will appreciate.

Thanks

Report this to a Moderator Report this to a Moderator
 28-Feb-2007 16:06
User is offline View Users Profile Print this message


Jobina Johnson

Posts: 55
Joined: 12-Sep-2002

You are welcome, but I can't take the credit for the script. Its one that I got from someone else, can't remember if it was from this site or somewhere else. Glad I was able to assist.

Sorry, I don't have a beginners manual for DXL

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


jobina.l.johnson@boeing.com
Report this to a Moderator Report this to a Moderator
 3-Sep-2008 16:37
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Included is an updated of the Kitchen script posted above to make the script easier for users to implement and eliminates one bug -- ie., kitchen script could delete ole objects.

This script "In_Style.dxl" removes reliance of include file and pictures.

Edited: 4-Sep-2008 at 01:57 by ron lewis
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.