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: Changing Object Text Styles Based on Attribute
Topic Summary:
Created On: 26-Jan-2007 22:55
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.
 26-Jan-2007 22:55
User is offline View Users Profile Print this message


Nancy Smith

Posts: 11
Joined: 19-Jul-2006

We have an enumerated attribute called Text Type that allows us to differentiate between objects that are just context versus objects that are requirements. We would like objects that are just context to be in italic. Is there a script that will change the text style of an object based on an attribute selection (in this case Context)?
Report this to a Moderator Report this to a Moderator
 30-Jan-2007 19:19
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

I have a similar problem (refer to my post on 29 Jan 07). Hopefully one of the specialists will come up with a solution.

- Krishna
Report this to a Moderator Report this to a Moderator
 5-Feb-2007 12:11
User is offline View Users Profile Print this message


Martin Hunter

Posts: 86
Joined: 10-Jan-2005

I presume you want to change the style of the object text in DOORS not in an export to Word.
Something along the lines of this should do what your after. It will only change the objects in the current view so make sure the filter is off if you wish to change all objects.

==================================
Object o
Module m = current

for o in m do {
    if (o."Text Type" "" == "Context") {
        o."Object Text" = richText "{\\i " o."Object Text""}"
    }
}
ack "Done"
=================================

If you want the objects assigned as context to automatically change to italic then layout dxl would do the trick.



-------------------------
- Martin

Edited: 5-Feb-2007 at 13:32 by Martin Hunter
Report this to a Moderator Report this to a Moderator
 6-Feb-2007 23:51
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Your get-the-value part needs to be
richTextWithOle(o."Object Text")

Otherwise, your code will set to italics all Text of type Context currently displayed in the module. You may want to do this:
for o in entire mod do
{ if (isDeleted(o)) continue
to get all undeleted objects.

Notice that if the type changes, this code will NOT un-italicize it.

- Louie
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.