Hey, FUNC Text 2 --> *** The code below just seems to count the number of objects that has "FUNC" in the attribute of the module and not the attribute at the other end of the link: \\There is other code above this that reads the module and defines 'obj' and 'counter'. Link lnk for lnk in obj <- "*" do { Regexp srcPuid = regexp "FUNC" string reqSrcAttr = obj."IE PUID" if (srcPuid reqSrcAttr) { counter++ } } Any suggestions? Thanks, John jmcgown - Wed Dec 16 06:49:07 EST 2009 | |
Re: DXL: Using a regular expression at the end of a link Object oOther = source(lnk); if (null oOther) continue The 'regexp' function is EXTREMELY inefficient. Certainly move it out of the loop. In fact, searching for normal stuff like that you should just write a search utility, byte-by-byte searching in a buffer. Its more complicated, but much faster and doesn't tie up string table space, eventually slowing down DOORS even after the script ends.
| |
Re: DXL: Using a regular expression at the end of a link llandale - Wed Dec 16 10:52:01 EST 2009
Thanks for that, it works a treat! is a 'matches' function as inefficient as the 'regexp'? Thanks, John | |