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 Fundamentals :-)
Topic Summary:
Created On: 10-May-2004 13:49
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.
 10-May-2004 13:49
User is offline View Users Profile Print this message


Neil Davidson

Posts: 2
Joined: 18-Jun-2003

Hi,

Hope someone can help me perform this fundamental operation.

All I want to do is search within the object text for a specific word, and if that word is present then set an attribute accordingly.

I tried

Object o
for o in current Module do {
string ot = o."Object Text"
if (ot == "Figure*") o."Object Type"="Comment"
}

however I seem to be using the wildcard conditions incorrectly and don't get a match. I know that if you are making a filter you can use 'contains' . Is this where I should be looking.

Thanks for any help

Neil
Report this to a Moderator Report this to a Moderator
 10-May-2004 14:02
User is offline View Users Profile Print this message


Dave McMahon

Posts: 22
Joined: 28-Jul-2003

Hi
If you ony require to match the word "Figure" amongst the Object Text , have you considered using a regular expression?
The following might help:-

filtering off
Regexp isFigure = "Figure"
for o in m do {
thisText =o."Object Text"
if isFigure thisText then {
accept o
// or set another attribute with a particular value
} else {
reject o
}
}

filtering on


dave mc
Report this to a Moderator Report this to a Moderator
 10-May-2004 14:10
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The RegExpr should work. Also consider using the "findRichText" command. It will get the exact "offset" so long as the original string is in fact RAW text. Text = o."Object Text" does retrieve raw text, but Text = richText(o."Object Text") doesn't, and the offset is useful only in subsequent richText commands cut and replace.

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