Comments Cutting Tool

Does anyone know of a tool that goes through all code and cust out the Comments for documentation? I have spoken to my Nav HQ and they say they dont know of one. I know that a tool like this exsists in Java, but I am sure that a tool like this would be good in Navision. If it does not exsist would anyone be intrested in helping me create one? Regards Tony

What is this tool for? Do you want to create a text file containing all comments in the code, including Documentation()? And what are you planning to use this file for? Normally documenting the customization in the Documentation section with a reference to the actual code is working fine. Soren Nielsen, moderator Integration/Developer NOLUG

A tool that takes all objects, looks at them, finds all the Coments in them (// {}) cuts them and places them in a document with a reference to the object it comes from

For this you could use the Compare Toolkit provided by Navision Software. Just export all your modified objects, export the standard (unmodified objects) - run them through the compare toolkit. And voilá: you have the document you are requesting. Ok, this would include the changed code too :-). But an easy solution, with an existing tool. Soren Nielsen, moderator Integration/Developer NOLUG

I’m currently (since yesterday) working on an internal project we call “Change Management”. Parsing objects for comments is only one part of the project, even though it’s an important one. The main issue is to keep track of all changes: Who did which change, when, which objects were modified and what comments have been written. Taking all the changes of a version, you can easily create a full report containing all objects and all changes. Performing fulltext search on the comments is another feature which has prooved to be very usefull. You might want to have a look at this screenshot to get an idea. Marcus Fabian Edited by - fabian on 2001 Mar 23 00:01:06

I used the compare tool already to find out the exact modifcations that have been done. I am sure that this kind of tool could help everyone in the Navision Development world to document changes to systems with out having to write out massive documents. We all comment our work, or its a good idea to, so rather than finish a development project and sit down and write out another massive document in MS Word or whatever, we could create this tool and make it freeware so that everyone benefits. Im just going to look at this screenshot. Regards Tony

I think that the way that the development tools works in Financials are not really optimal. Especially if we talk about modification management. It’s like Navision has done a lot to make sure that things can be done. Just not how things can be done. They want larger clients and projects - but they don’t want to improve the tools available to the developers. But I don’t really know what this tool should do. And what I as a Navision developer should use this tool to. I just don’t see a use for this. As a part of a bigger improvement to Navision’s tool. With integrated source code control (as suggestion in another topic a few days ago). See that’s what I would like to see. Best regards, Erik P. Ernst, webmaster Navision Online User Group

Ok, Scenario, You receive a new customer with a already well developed Database. You know that the database has documention using the comments system // {}. You would have a nightmare to sit and open all the objects and look at all the objects one by one. What I am saying is create a total that goes through all the objects in the modified Databse and creates a text file/word document made up of all these comments. This way you could looka t the document instead, you wouldn’t need to loook for objects and code that has been modified you would simply run this tool and view the output. Regards Tony

There was an interesting discussion at about someone creating a parser for documentation using XML style tags, and then pulling that info out of modified objects, but I’m not sure if anybody actually wrote the parser or not. I really liked the idea of the XML style tags, but haven’t started implementing it yet. They are descriptive and adaptive, if a little verbose.


But I don’t really know what this tool should do.

  • Having all changes in three grouped tables (1 Header per Version, 1 Line per changed object, comment lines containing the documentation), lets you easily create a report per change which you wound not need for internal documentation but also could send to the customer so he can see what he spent his money for. * While it is easy in Tables and Codeunits to find a specific change by doing a search for the version number in the code, this is getting difficult in forms and reports. Having this information in a searcheable db which tells you in which DataItem - Report Section you have done a change is of great help. * You might run into a problem which most likely has already been solved by another developer in your company. Doing a search for a keyword would give you exact location on who did this change, where he did it and which objects he had to touch to accomplish this task. Just imagine a typical case which we all had to do in our live: A new field in T37 has to be propagated to T32, T111, T113, T115 etc. For a beginner it’s not an easy task to learn which other tables (83) and codeunits have to be modified. * Once you have to do an upgrade. You’ll be happy to have a complete list of all objects and locations where customer changes have been made. Aren’t that reasons enough? ------- With best regards from Switzerland Marcus Fabian

Tony There is no easy path, I even check the service packs for code errors, you need to look and understand the changes compared to the old version within the whole code structure not just over 4 or 5 lines, then you may find the changes in your old Version have been replace within the code of the new Version by NS and are redundant. NB: I found and reported some 15% of objects with Errors in the NAD service pack so it was worth the time spent. Navisions Compare tool will work just fine for you, look at the changes and thier position within the code. These are the tools that Navision use to localise the Version upgrades and bring in changes from WW1. Upgrading it will show the changes and allows merge. you compare customers Modified with base 1.30GB Standard Navision 1.30GB Custom Navision Then you can easy identify the Modifications Which may or may not be “// {}” Marked Then you Import a Standard Latest Version and Create your Customers Latested Version Its good for Tables, Codeunits, processing reports, and will identify form changes for you. David Cox MindSource (UK) Limited Navision Solutions Partner Edited by - David Cox on 2001 Mar 24 08:21:09

ALL :- This tool already exsists for Java, (javadoc) It is how they created most of the documentation for the API. So if Java has got it it must be half decent. I am sure if it exsisted I would use it. My problem is I dont have the expertise to create it, otherwise I would and send it to you all so you understood what I meant. DAVE :- I used the merge tool (first thing I did) and found 12000 modified lines of code in the Database, all of which have comments on them. If I could extract all these comments then I could possible cut these 12000 lines to a couple of hundred and still get the nature of the mods. Fabian - Do you agree with me?

The thing is IMHO that the comments are only a small part of the picture. So much more is needed. The next thing is that as long the use of comments is not required, nor that you have no way that these comments are standardized, then if you have a client where you are only one of maybe many different developers from maybe many different NSC’s, then this is even more problematic. If only the usage of comments where standardized, then this thing would make much more sense. I’ve seen many ways of writing comments, some better than other. And I will start a topic just on this. Best regards, Erik P. Ernst, webmaster Navision Online User Group


If I could extract all these comments then I could possible cut these 12000 lines to a couple of hundred and still get the nature of the mods. Fabian - Do you agree with me?

If you would have asked me a week ago I probably would have agreed. but now: No, I don’t agree anymore: The point is that I learned that comments alone are not the only key issue. It is also important to know where these comments have been written. The comment “Get new number” doesn’t have any meaning unless you know that it refers to a dataport which imports customer entries. But once again, I am not talking only about comments but I’m talking about Change Management as a whole: A structure of data which allows you to determine who has done what change for which customer. And a tool which allows you also to print reports with all relevant information. I know that you, Toni, would be interested in such a tool providing it’s in english language (an accepteable demand). I was setting up such a tool for an NSC in Switzerland who mainly uses it for internal purposes. I do not have any permission to publish the code of this tool (neither as freeware nor as shareware or add-on) without the permission of the NSC who ownes the copyright. However as far as I know the CEO of this NSC I have reason to believe that he would not object to release it as add-on as long as the possible sale would cover the expenses of a translation to englisch language. Personally I would suggest the following: Once I have finished this Change Management module and it is tested and working, I would translate it into English (with best of my knowledge of english language). An NSC in the UK or USA would then receive the module for free providing that they correct the english translation and send us the modified/corrected version. Would this be a suiteable way for you? However, as I said, it’s not up to me to decide. But I think this would be a good way for both sides. And have us set-up a suiteable tool which could server any NSC. ------- With best regards from Switzerland Marcus Fabian

Marcus If you need any help with the translation let me know, i don’t work for an NSC so no conflict of interest here! David Cox MindSource (UK) Limited Navision Solutions Partner Email: Web:

Is there any system table that stores the coding done to a particular table, report etc. just like Navision stores it’s fields from a table in a system table. I have searched myself and can’t find any table that functions in that way. It would be good though to have a table like that, then we can pull all the documentation info. To get it working we need to know where the coding in Navision is stored.

Marcus, if you need any help with the Change Management tool, let me know. We have many modified databases we could make it work away on and see how it goes. Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu

Navision do not stores any code in readable format. All is compiled (translated). All what you see on screen - it’s decompiled “on-fly”. Use comments - bad idea. For full code changes tracking you need to store line of code in text format with unique line’s ID including for deleted rows (!), also you must have checksum for this line. I many times hear about attempts to track changes, but i never hear about success. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Hello, (reaction on the original question) For documentation purposes I made the following tool. We make an Impuls Workbench Database of the customer database with our adjustments. Then we open the Impuls database in Navision again, and add a report (called documentation sucker). This report prints all documentation I need: New fields with documentation, New tables, Documentation per table, per function, per field, etc… etc… We document with //DOC in the code and find that back in the impuls database. Most important is that the database itself contains always the right updated documentation on the place you need it. Kind regards, Jos van de Werken Weha Automatisering b.v. The Netherlands Jos van de Werken Weha Automatisering b.v. The Netherlands


Navision do not stores any code in readable format.

Unless you save the objects as .TXT files. They you can relatively easy suck the comments out.


including for deleted rows (!),

Wrong, you NEVER EVER delete original code lines. You comment them out like this //CUST01-03 {orig purchline.modify; } purchline.modify (true); //cust01-03


also you must have checksum for this line.

What for?


I many times hear about attempts to track changes, but i never hear about success.

Amazingly enough our hange Management tool has proved to be very helpful providing that every programmer uses it. We still find every day some problems to be solved or have idea to improve it but so far it looks like it work. Even NDK showed interest in it. As far as I have the impression that it’s working 100% satisfactury I’ll have it once again checked by a true professional (David Cox) and if David approves we’ll have it pblished as add-on. ------- With best regards from Switzerland Marcus Fabian