Topic
  • 3 replies
  • Latest Post - ‏2012-11-12T14:35:28Z by Mathias Mamsch
SystemAdmin
SystemAdmin
3180 Posts

Pinned topic Export on word

‏2012-11-08T13:55:10Z |
Hello,

I'm just beginning the DXL and Doors,
and I would like to do this (in Attach file the PNG).

I hope that you will be able to help me
Updated on 2012-11-12T14:35:28Z at 2012-11-12T14:35:28Z by Mathias Mamsch
  • Mathias Mamsch
    Mathias Mamsch
    1970 Posts

    Re: Export on word

    ‏2012-11-08T20:10:14Z  

    The questions for you are here and you need to answer them completely separately:

    • How do I get the class names, procedure texts and types from my DOORS module
    • Provided I have the classes, their test procedures and their types, how exactly would I lay them out in my word document.


    Technically of course what you ask is possible. You need to know the following:

     

     

    • all non commercial exporters will allow you to do a word export in table format from a DOORS view, that means, that for each object in your DOORS module you can have one table row and for each column in your view you get one table column in your word document. The content is completely customizable by DXL layout/attribute DXL, you can filter your views, and insert the columns you like. However at some point your DXL columns will become so complex, that you might decide to write a custom exporter that will bring you the format you want. You could write a program like follows:

     

     

     

    int classes = getNrOfClasses() 
     
    int tableColumns = classes * 2; 
    int tableRows    = getNrOfProcedures()
     
    OleAutoObj wDoc = Word_Make_New_Document () 
     
    OleAutoObj wTable = Word_Make_Table(wDoc, tableRows, tableColumns) 
     
    int col = 0 
    for className in getClassNames() do {
        int row = 1
     
        // write the class name
        fill_word_table_cell (wTable, 0, col+1, className)
     
        for procedureText in getProcedures(className) do {
            // write the classes and the procedure texts
            fill_word_table_cell (wTable, row, col  ,  getClassType(className, procedureText))
            fill_word_table_cell (wTable, row, col+1,  procedureText)
        }
        col += 2
    }
    



    which provided with the right functions getClassNames, getClassType, etc., would give you a table like in your picture. The only thing you need to do is implement all the functions that are referenced here. I hope that helps, regards, Mathias



     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    Updated on 2014-01-09T10:38:21Z at 2014-01-09T10:38:21Z by iron-man
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: Export on word

    ‏2012-11-12T13:17:06Z  

    The questions for you are here and you need to answer them completely separately:

    • How do I get the class names, procedure texts and types from my DOORS module
    • Provided I have the classes, their test procedures and their types, how exactly would I lay them out in my word document.


    Technically of course what you ask is possible. You need to know the following:

     

     

    • all non commercial exporters will allow you to do a word export in table format from a DOORS view, that means, that for each object in your DOORS module you can have one table row and for each column in your view you get one table column in your word document. The content is completely customizable by DXL layout/attribute DXL, you can filter your views, and insert the columns you like. However at some point your DXL columns will become so complex, that you might decide to write a custom exporter that will bring you the format you want. You could write a program like follows:

     

     

     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">int classes = getNrOfClasses() int tableColumns = classes * 2; int tableRows = getNrOfProcedures() OleAutoObj wDoc = Word_Make_New_Document () OleAutoObj wTable = Word_Make_Table(wDoc, tableRows, tableColumns) int col = 0 for className in getClassNames() do { int row = 1 // write the class name fill_word_table_cell (wTable, 0, col+1, className) for procedureText in getProcedures(className) do { // write the classes and the procedure texts fill_word_table_cell (wTable, row, col , getClassType(className, procedureText)) fill_word_table_cell (wTable, row, col+1, procedureText) } col += 2 } </pre>



    which provided with the right functions getClassNames, getClassType, etc., would give you a table like in your picture. The only thing you need to do is implement all the functions that are referenced here. I hope that helps, regards, Mathias



     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    Thank you Mathias for your help.

    I just have a question the functions : getClassNames, getClassType, etc.
    I need to creat them or i can find them somewhere.
  • Mathias Mamsch
    Mathias Mamsch
    1970 Posts

    Re: Export on word

    ‏2012-11-12T14:35:28Z  
    Thank you Mathias for your help.

    I just have a question the functions : getClassNames, getClassType, etc.
    I need to creat them or i can find them somewhere.
    Well, you would create these functions of course, but it is probably not easy for a DXL newcomer. You need to get a copy of some word library and then implement the functions. However I think the above snipped (while it contains an error with the counter variables) will probably NOT fit what you had in mind, because you provided not enough information about the layout of your word file and the information of your DOORS module.

    Therefore I suggest you tell us in a little more detail, what information you are displaying (and why) in the word file and tell us how that information is represented in your module (e.g. I have a DXL layout column that shows linked test procedures for the classes in the module... Test procedures are in a separate modules and link to ... Classes are ...) . That will help us people to give suggestions to you on how to approach this. If you are lucky, you do NOT need to implement a custom exporter, but can use some clever DXL columns and a standard word exporter.

    Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS