home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Demo / conceptdraw / data1.cab / Samples__Basic / Solutions / Diagraming / CircleDiagram / ReadMe.txt < prev   
Text File  |  2004-02-13  |  2KB  |  8 lines

  1. This sample demonstrates how ConceptDraw can be used to visualize data from external files. It creates pie charts, based on information contained in text files. These pie charts help to compare the results of several departments of a company.  
  2.  
  3. The files Diagram1.txt and Diagram2.txt contain information about revenue of several affiliates of a company in various regions. The CircleDiagram.cdb file contains macros which read information from these files and build pie charts based on the data. The macros in this file are called from document-level scripts in xml-files ConceptDraw CircleDiagramLibObj.cdx and CircleDiagram.cdx are shared by these files. The only difference between the examples in two documents is that the first one uses pre-drawn library shapes to draw segments of the pie chart (the ChartingFigures.cdl library in the same folder), whereas the second one draws the segments from scratch by using the means of ConceptDraw Basic.  
  4. In the group shapes, inside which the mentioned diagrams are created, text properties are saved. These properties contain the full name of the file, from which the data was last time read. So, next time the BarChart.cdx document is opened or on executing the "Refresh" command from the user menu the diagrams will be updated without asking for the name of the data file. The macro assumes that the data in the text file are specifically formatted. For instance, in  Diagram1.txt the location of the affiliate must be specified in the first column, and information about total revenue in the ninth one. In Diagram2.txt this information is stored in the second and thirds columns respectively.
  5.  
  6. If the "Enable ConceptDraw Basic script autorun" flag is set in the Preferences dialog of Conceptdraw, on opening the CircleDiagram.cdb document a new submenu Fill Diagrams will be added to the Tools menu. It allows to build diagrams based on data in corresponding formats. You can refresh each diagram separately, buy choosing the name of the source file, or refresh all previously drawn diagrams.
  7.  
  8. If the "Enable ConceptDraw Basic script autorun" flag is not set in the Preferences dialog of ConceptDraw, the script can be run from the ConceptDraw Basic editor (Tools->ConceptDraw Basic->Document Script->Edit). Then you'll need to run the CreateUserMenu() procedure from the Build->Run menu. The user menu  will be automatically added to the Tools menu of the document window.