Engineering

  • 1.  How do I apply a custom filter to see bold text only

    Posted Thu June 15, 2017 01:07 PM

    Hello,

     

    I’ve uploaded a word document to formal module in DOORS. Now I want to apply a custom filter or DXL code that allows me to only see bold text in that same formal module.

     

    Can anybody help find a solution on how to do this? Thanks!



  • 2.  RE: How do I apply a custom filter to see bold text only

    Posted Tue July 25, 2017 10:52 AM

    Try this...



  • 3.  RE: How do I apply a custom filter to see bold text only

    Posted Mon October 18, 2021 09:46 AM
    I was also looking for some solution

    ------------------------------
    Albert Mike
    ------------------------------



  • 4.  RE: How do I apply a custom filter to see bold text only

    Posted 20 days ago
    for rich text in string

    This is DXL function in 9.7.

    I can help you out further, if you can write your exact requirements.

    ------------------------------
    Chidambaram Lakshmanan ALM Consultant
    PESIL Technologies
    Chennai TN
    ------------------------------



  • 5.  RE: How do I apply a custom filter to see bold text only

    Posted 20 days ago

    You can use this function to build your filter ... 

    string get_bold(Object obj){
        string s = richText(obj."object text")
        if (null s) return ""
    
        RichText rt
        RichTextParagraph rp
        string result = null
    
        for rp in s do {
            for rt in rp do {
               if (rt.bold) 
                   if (null result) result = rt.text
                   else result = result "\n" rt.text
            }
        }
        
        if (null result) return ""
        return result
    }
    

    Enjoy ! ;)



    ------------------------------
    steeve rodriguez
    ------------------------------