![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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. | |||||
![]() |
|||||
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.
|
|||||
![]() |
|||||
![]() |
|||||
Here is a Kitchen DXL script that uses a GUI to do what you are looking for
------------------------- jobina.l.johnson@boeing.com ![]() |
|||||
![]() |
|||||
![]() |
|||||
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 |
|||||
![]() |
|||||
![]() |
|||||
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. |
|||||
![]() |
|||||
![]() |
|||||
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 ![]() |
|||||
![]() |
|||||
![]() |
|||||
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 |
|||||
![]() |
Telelogic DOORS
» DXL Exchange
»
DXL script to Bold a single word
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.