Menu

Documentation generator using Word 2013

Anonymous
2013-08-05
2014-04-02
  • Anonymous

    Anonymous - 2013-08-05

    Hi I just migrated from Word 2003 to word 2013 and I'm no more able to generate documentation.
    Which is the word version supported by WitheStarUML? Is there any tip you can suggest to re-enable the documentation generator?

     
  • Janusz Szpilewski

    I have not looked at Office 2013 yet but as all worked flawlessly since StarUML days till at least Office 2007 one can expect that the COM interfaces are still preserved. However a serious clash may happen if you installed the 64 bit version of Word 2013. With WhiteStarUML still being 32 bit those programs probably will not cooperate well at the COM level.

     
  • Anonymous

    Anonymous - 2013-08-06

    The version installed is 32 bit.
    I'm using a document template that runs well in word 2003. It runs through some objects in the model (repeat) to get Diagrams, object Name (Display) and object Documentation (Display).
    Running Documentation Generator with word 2013 all step runs well, without errors.
    Despite this, the generated word document is missing of almost all of the diagrams (it shows only the last one in the model), is missing of almost all of the objects name (it shows only the last one in the model) and is missing all of the documentation part.

     
  • Janusz Szpilewski

    I suppose you may be using your own documentation template so probably you could also test the standard template with "Sample model for Generator.uml" sample file and check if there is also any anomaly there.
    Finally the generation is done in a JavaScript file:
    \modules\staruml-generator\translators\word\WordTranslator.js
    and it can be easily modified without any compilation i.e. some additional "log" commands may be added so you might detect something unusual.

     
  • Michal

    Michal - 2013-08-08

    Hi
    This is very interesting. Then I make some tests.
    On new virtual Win7 I installed Office 2013, WhiteStarUML 5.4.1.0, template which we use in the company.
    The process of generating DOC work OK and output is OK.

    Anonymous: maybe you can attach your template or fragment. I can look at, or test on my virtual machine.

     
  • Anonymous

    Anonymous - 2013-09-23

    Sorry for this late response, but I'm so busy working that I was not able to find time to debug this problem.
    First of all ... thanks for responses.
    Second .. I'm not a programmer and I've not the environment to put in debug mode the program; what I've done is just put some "log" instructions in the WordTranslator.js and analysed the output.
    I've pinpointed the traverseItemTemplate function; it call the createSubArray to build the array from word.collection, that is the input to traverseTemplate function, using K and L as start index and end index of the word collection.
    At list this is what I've understood.
    Processing a collection made of REPEAT DISPLAY DISPLAY ENDREPEATR (is a table in my template)
    1) traverseItemTemplate is called for each item in the UML collection model;
    2) processing the first item in the model collection, traverseItemTemplate call createSubArray (with K and L values) that builds an array of 3 items, that contains DISPLAY DISPLAY ENDREPEATR
    3) this array is passed the to the traverseTemplate function that call traverseDisplayTempate
    4) traverseDisplayTempate write the text from the model to the Word document (OK)
    5) processing the second (to the last) item in the model collection, traverseItemTemplate call createSubArray (with the same K and L values as for the first item) that builds an array of 3 items, that contain REPEAT DISPLAY DISPLAY
    6) this array is passed the to the traverseTemplate and in this case nothing id written to the worf document (NOT OK)
    I'm still try to debug the problem, but if you have any idea of what can be the problem, please let me know.
    Thanks ... Dario

     
  • Janusz Szpilewski

    So it looks that in some cases "REPEAT DISPLAY DISPLAY" misses ending "ENDREPEATR".
    After looking at selectRange() one line looks suspicious:

    if (wordApp.selection.Text.charCodeAt(0) == 13)
    

    It expects the enter code but it may behave differently if the text passed from Word to the script is presented as Unicode text or in another case as a basic ASCII text. So maybe you could add some logs there too and see if your template is affected by that code.
    Something like:

    if (wordApp.selection.Text.charCodeAt(0) == 13)
    { 
        log("charCodeAt(0) matches 13);
        w = 1;
    }
    else
        log("charCodeharCodeAt(0));log("charCodeAt(0) : " + wordApp.selection.Text.charCodeAt(0));
    
     
  • Anonymous

    Anonymous - 2013-09-24

    Added log in selectRange() and in both cases number 2) and 5) the "charCodeAt(0) matches 13" message is logged; so the problem seems not to be related to the fail of the test.
    Thanks ... Dario

     
  • Michal

    Michal - 2013-09-25

    Moment!

    ENDREPEATR ??? With "R" on the end?
    I have in all my working templates "ENDREPEAT", without "R".
    Maybe check this.

     
  • Anonymous

    Anonymous - 2013-09-26

    In Word template row of table can be iterated to include text from components of the model (each component text in one table row).
    In my case I'm using [REPEAT] and [ENDREPTR] command.
    [REPEAT] comment is placed in the first cell of row and [ENDREPTR]comment is placed in the last cell of row. [DISPLAY] comment is placed between REPEAT and ENDREPTR.
    See StarUML 5.0 Developer Guide on page 113. Regards ... Dario

     
  • Anonymous

    Anonymous - 2014-04-02

    On 2013-08-06, anonymous writes: "...it shows only the last one in the model...". I have this same problem still in WhiteStarUML as I also had it in StarUML. I am running W7-64 and Word 2013, and I experience the identical problem on two different machines. The third machine, where al OS and other programs are identical, there is Office 2007 installed. There, the generator works perfect. We are running templates out of the box, no self made stuff here. We're just starting to learn the tool. So I suspect strongly this only has to do with the Office version. Are there any plans to fix this problem?

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.