Topic
8 replies Latest Post - ‏2013-02-05T15:25:03Z by SystemAdmin
lanef
lanef
18 Posts
ACCEPTED ANSWER

Pinned topic DXL Script Randomly dropping last row of some tables

‏2013-01-29T17:03:33Z |
Hi,

The group I work with has developed scripts to output DOORS info to Word documents. For some reason (that I can't determine) the last row of some tables gets orphaned. So when the script completes all the information is there but there are a couple of dozen one row tables at the end of the document. The rows have the right information in them but somehow got split off from the table they were supposed to be with. If there's a reason/rhyme/pattern to the rows that get orphaned, I can't see it.

Thank you for any help/suggestions.

Best,
Frank
Updated on 2013-02-05T15:25:03Z at 2013-02-05T15:25:03Z by SystemAdmin
  • llandale
    llandale
    2943 Posts
    ACCEPTED ANSWER

    Re: DXL Script Randomly dropping last row of some tables

    ‏2013-01-29T18:27:43Z  in response to lanef
    Don't know. Hard to debug a script I cannot see.

    Look at the "Paragraph Style" of the cells associated with those orphaned rows. Also see of the text in those cells is really in "Object Heading" instead of "Object Text". You can do that quickly with "Table Attributes"; first display "Paragraph Style" for one of those tables, then show "Object Text", then "Object Heading".

    -Louie
  • Mathias Mamsch
    Mathias Mamsch
    1938 Posts
    ACCEPTED ANSWER

    Re: DXL Script Randomly dropping last row of some tables

    ‏2013-01-29T19:46:48Z  in response to lanef
    Did you have a look at line 753? It looks weird! :-) Seriously how are we supposed to help you without looking at the code? If you do possess the DXL Debugger, then you can step through your code, continuously watching the Word Document to find out where the rogue lines are inserted. Regards, Mathias


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
    • lanef
      lanef
      18 Posts
      ACCEPTED ANSWER

      Re: DXL Script Randomly dropping last row of some tables

      ‏2013-01-29T19:59:37Z  in response to Mathias Mamsch
      Thank you Louie and Mathias! I'm going to investigate paragraph formatting. And I'm very bothered by not having a DXL debugger, although the kicker is the problem occurs at different locations different runs. Posting the code would violate my companies policies about proprietary stuff (insert legal mumbo jumbo here that I don't understand but know I have to abide by). It's at that point where I don't have a clue as to what to do or how to proceed. Thank you both very much for your responses.

      BTW I've been lurking here awhile and you two gentlemen stand out as fantastic, always helping, and very willing to share your immense knowledge. I've been more than impressed with your skill sets in DXL and programming in general.

      Thank you!

      Best,
      Frank
    • SystemAdmin
      SystemAdmin
      3180 Posts
      ACCEPTED ANSWER

      Re: DXL Script Randomly dropping last row of some tables

      ‏2013-01-30T07:25:38Z  in response to Mathias Mamsch
      > Seriously how are we supposed to help you without looking at the code? If you do possess the DXL Debugger, then you can step through your code, continuously watching the Word Document to find out where the rogue lines are inserted. Regards, Mathias
      Sorry, but is is very hard to debug a code of this size with the debugger. If you have a standard connection to word, you have tons of predefinded strings and for the debugger it gets time of minutes to get them all. Step by step minutes by minutes.
      And sometimes the stepping routine breaks and you can start again.
      • Mathias Mamsch
        Mathias Mamsch
        1938 Posts
        ACCEPTED ANSWER

        Re: DXL Script Randomly dropping last row of some tables

        ‏2013-02-01T14:51:48Z  in response to SystemAdmin
        Hey,

        I did not experience problems with debugging the Word Exporter ... What I normally do is hide the variable window to speed up stepping until I am at the position that I need. The next thing you need to know, is that you can turn off showing the global variables, so you will only see the local variables. This is usually very fast.

        If you experience problems with the debugger, you can always contact Sodius or us. What do you mean by "the stepping routine breaks"? Are you getting a crash? In this case, can you make contact to us or Sodius, so we can get a possible bug fixed? Regards, Mathias


        Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
        • SystemAdmin
          SystemAdmin
          3180 Posts
          ACCEPTED ANSWER

          Re: DXL Script Randomly dropping last row of some tables

          ‏2013-02-05T15:25:03Z  in response to Mathias Mamsch
          Hello Mathiaus

          > What I normally do is hide the variable window to speed up stepping until I am at the position that I need. The next thing you need to know, is that you can turn off showing the global variables, so you will only see the local variables. This is usually very fast.

          Thanks, I'll try this in such cases

          > If you experience problems with the debugger, you can always contact Sodius or us.

          The problem is to large to write an error message or to reduce the problem to a test case. Believe me, if I've had a little chance, I would do it. But actually I do not have any ideas, and actually thoose problems do not occure very often. But may be that turning off those variables will help.

          > What do you mean by "the stepping routine breaks"? Are you getting a crash? In this case, can you make contact to us or Sodius, so we can get a possible bug fixed? Regards, Mathias

          It is more a disconnection between doors and the debugger. The debugger stops and the script stops too. And then I'm in the middle of nothing.

          Best regards
          Wolfgang
      • lanef
        lanef
        18 Posts
        ACCEPTED ANSWER

        Re: DXL Script Randomly dropping last row of some tables

        ‏2013-02-01T15:05:12Z  in response to SystemAdmin
        Hi,

        Wanted to write a quick Thank you to Wolfgang for having the kindness to respond. Thank you!

        And he's exactly right in that the size of the code is a serious hindrance to effectively doing anything (other than studying it and hoping one day to understand it better).

        The problem appears fixed via a fluke occurrence. I've sent the updated code to the end user for his test and approval before formally checking the code in.

        What appears to have fixed it is a change I made in attempt to make the monstrous thing run faster. In the outer loop that jumps through the objects in the starting point module I added code to turn off pagination, spellchecking, grammar, view to normal, and turned screen updating off. This had to be done every pass because code deeper in the loop jumps back and forth between the main document and headers and footers. The seek main document commands have to be executed in printview mode which screws up the pagination and other things. So after adding this change execution sped up by about 3x and the orphaning problem just went away. I hate things like that, sort of a cross between blind luck, voodoo, and magic.

        This behaviors confirms a back channel message a lady was kind enough to send me stating that Word/DXL coupling could be touchy/spotty.
        • llandale
          llandale
          2943 Posts
          ACCEPTED ANSWER

          Re: DXL Script Randomly dropping last row of some tables

          ‏2013-02-01T15:35:13Z  in response to lanef
          The original DXL developers obviously believed in Karma. That's not true but believing it makes one write cleaner code just in case.