datadictionary or data-model diagrams

Has anyone a overall description of the Navision data-model. It would be nice to have Visio sheets ranging from global model to detailed description. If such a thing does not exists allready why not create this together and put it on this site ?? Please react… Peter van Lingen LEVEL automatisering b.v. Netherlands.

Hi, I heared that such model available in AIRIS. But it cost about $20000. Valentin Gvozdev BMI Inc.

It could be a silly question, but… Have you checked-out ‘Impuls Workbench’?

I did not check out Impulse, I will do so… But I guess it won’t produce any diagrams, just a bulk of data. I would like to use the diagrams to instruct novice coworkers the main data-model of Navision. It will also be usable in the design phase to clarify discussions with the client about the datamodel to create… (allways as much as possible the same as navision allready works) Anyone has done some data modeling yet ? Peter van Lingen LEVEL automatisering b.v. The Netherlands

I believe Navision A/S in Denmark has certainly some sort of data model (UML?) for the entire application. It will be great if Navision A/S would make those data models available for all NSC since Navision seems to be concerned with methodology providing those would be of great help for those writting design specs for add on module/features around the standard application. Tarek Demiati tarek_demiati@ureach.com

Has anyone started this project? I would be very interested in helping out. We need to come up with a format and agree on what platform to use (Visio or some other application). I have thought of writing a report to generate the Datamodel. But I can’t decide on how to represent it in text effectively. I also thought of using Automation Controller to generate a Visio document, but have not had time to try that one. Let me know what you think. Jason Prickett

I didn’t get too much feed back but I wanted to let you all know that I had some success with Visio and Navision 2.50. I was able to load the Tables into Visio as boxes, but could not get the connections to work. Here is my code (this is in a navision report – the dataitem is the Object table - filtered to only include tables and to exclude virtual tables) Global Variables Name DataType Subtype VisioApp Automation ‘Visio 2000 Type Library [Service Release 1]’.Application VisioDoc Automation ‘Visio 2000 Type Library [Service Release 1]’.Document VisioPage Automation ‘Visio 2000 Type Library [Service Release 1]’.Page VisioMaster Automation ‘Visio 2000 Type Library [Service Release 1]’.Master VisioShape Automation ‘Visio 2000 Type Library [Service Release 1]’.Shape VisioCell Automation ‘Visio 2000 Type Library [Service Release 1]’.Cell I Decimal J Decimal OnPreDataItem() CREATE(VisioApp); VisioApp.Visible := TRUE; VisioDoc := VisioApp.Documents.Add(‘Basic Diagram.vst’); I := 10 - 0.25; J := 0.25; OnAfterGetRecord() //VisioPage.Drop(VisioShape, 100, 100); VisioApp.ActivePage.DrawRectangle(J, I, J+1, I+1); VisioApp.ActivePage.Shapes.Item(VisioApp.ActivePage.Shapes.Count).Name(FORMAT(Object.ID)); VisioApp.ActivePage.Shapes.Item(VisioApp.ActivePage.Shapes.Count).Text(Object.Name); J := J + 1.25; IF J > 7.5 THEN BEGIN I := I - 1.25; J := 0.25; END; This is what I tried for the connections. Added a dataitem to the report – the field table – filtered for fields that Table Relations. Then I tried the following code: OnAfterGetRecord() VisioCell := VisioApp.ActivePage.Shapes.Item(FORMAT(Field.TableNo)).Cells(‘Geometry1.X3’); VisioShape := VisioApp.ActivePage.DrawLine(1,1,2,2); VisioShape.Cells(‘BeginX’).GlueTo(VisioCell); Unfortunately, Navision does not like the return values from the functions. I was able to work around this until I got here. The error is that the return value VICell does not match the type Cell. Any help would be greatly appreciated. Jason Prickett

Here’s the reply… I like your idea of using visio. keep us informed. I will when i have input for you regarding the use of visio but i’m not familiar with ‘programming’ inside vision so it will take some time. Peter

I have uploaded my objects to MyNavision.net. Take a look. I got the Visio thing to work but only after I created a middle layer Automation Server. Navision just did not like Visio’s object model. So, I created an automation server in Delphi that would control Visio for Navision. My automation server, of course, has a much simpler interface. A Navision report still drives the process. I have included a readme that describes how to install and use everything. Please let me know what you think.

Jason, Nice utility… I immediatly tried running the report and an error was reported: ‘Could not invoke the member Createtable’. Maybe it is possible to publish the sourcecode or mail me directly so we can all contribute. Thanks for the work and thinking so far… Peter.

Here’s the Automation Server Code. This is in Delphi (my old love). It should easily translate into C++, but of course this looks much more like Navision C/AL Enjoy… unit VisioDriverClass; interface uses ComObj, ActiveX, VisioDriver_TLB, Visio_TLB; type TVisioDriver = class(TAutoObject, IVisioDriver) private VisioApp : Application_; VisioDoc : Document; VisioPage : Page; VisioCell : Cell; VisioShape : Shape; I,J : Real; protected procedure CreateConnection(FromTableNo, ToTableNo: Integer); safecall; procedure CreateTable(TableNo: Integer; const TableName: WideString; xPos, yPos: Double); safecall; procedure CreateVisioObject; safecall; procedure MakeVisioVisible; safecall; { Protected declarations } end; implementation uses ComServ, SysUtils; procedure TVisioDriver.CreateConnection(FromTableNo, ToTableNo: Integer); begin VisioCell := VisioPage.Shapes.Item[Format(’%d’,[FromTableNo])].Cells[‘Geometry1.X3’]; VisioShape := VisioPage.DrawLine(1,1,2,2); VisioShape.Cells[‘BeginX’].GlueTo(VisioCell); VisioCell := VisioPage.Shapes.Item[Format(’%d’,[ToTableNo])].Cells[‘Geometry1.X3’]; VisioShape.Cells[‘EndX’].GlueTo(VisioCell); end; procedure TVisioDriver.CreateTable(TableNo: Integer; const TableName: WideString; xPos, yPos: Double); begin VisioPage.DrawRectangle(xPos, yPos, xPos+1, yPos+1); VisioPage.Shapes.Item[VisioPage.Shapes.Count].Name := Format(’%d’,[TableNo]); VisioPage.Shapes.Item[VisioPage.Shapes.Count].Text := TableName; end; procedure TVisioDriver.CreateVisioObject; begin VisioApp := CoApplication_.Create; VisioDoc := VisioApp.Documents.Add(‘Basic Diagram.vst’); VisioPage := VisioApp.ActivePage; end; procedure TVisioDriver.MakeVisioVisible; begin VisioApp.Visible := TRUE; end; initialization TAutoObjectFactory.Create(ComServer, TVisioDriver, Class_VisioDriver, ciMultiInstance, tmApartment); end.

You can use a tool (like powerdesigner) to reverse engineer the Navision Database. C/SIDE through ODBC (you wil not obtain any reference information) or native SQL-Server scripting. ICM Solutions B.V. ir. D.C. Oerlemans dc.oerlemans@icm-solutions.nl