Filling of a pattern of document |
Any report is printed on the basis of the pattern which has been created and set up in advance. In a pattern the name of the report, the top and bottom headlines, parameters of page and many other things are specified. The pattern of the document consists of a substantial part which is not edited by system, and key fields which during creation of the report are replaced with the corresponding values from the metric and attributive information on object. Key fields represent a set of the capital latin letters concluded from two sides by a sign # (for example, #AREA# - the area of a site). At creation of the report the system automatically by replacement of a key field by values of data carries out substitution of the necessary information into the report.
In a pattern of the report the presence of two types of key fields is stipulated: regulated by system and operated by the user. The regulated field has rigidly certain name which the user should not change (seeList of the regulated fields ) and is intended for a placing into the report of the information on the metric description of a plot. The fields operated by the user are intended for a placing into the report of the attributive (semantic) information. An arrangement of fields, a common view of the document at a print, the font, etc. is set up by the user by editing a pattern by means of Microsoft Office. Regulated key fields carry the information on scheduled position of object (plot) and specify to system a location in the report of the first value of the corresponding characteristic. The regulated key fields should be located into the table (each field into the own cell). If the object has more than one point of the metrics such field specifies to system starting position of a placing of the metric information, addition of necessary quantity of lines occurs automatically. Regulated key fields carrying the information on scheduled position of internal objects, that is those objects, which are located inside of a plot (NTOBJ, XOBJ, YOBJ, DIROBJ, LINEOBJ, STROBJ) specify a location in the report of the first value of the corresponding characteristic. A determinative key field at search of the location in the report of the information on internal objects is NTOBJ, all other fields of the given group should be placed together with it in one line of the table. Otherwise the program will incorrectly execute formatting of data. Regulated key fields can be of two types. Fields of the first type are intended for an insert of one value, for example X coordinate. Filling the such fields is made as follows: the program finds a key field in a pattern and onto its place inserts the data corresponding to quantity of points of object (a plot or internal object). Regulated fields of the second type are intended for an insert into the report of the whole line corresponding to a certain set. For example: STR1 = NT X Y DIR LINE, where NT - number of a point, X - X coordinate, Y - Y coordinate, DIR - a direction angle of a piece between rotary points, LINE - length of this piece. Fields of the given type in a pattern of the document can be located only in the table, in the first cell of the line corresponding by number of cells to quantity of elements of data. For example, for STR1, in the table there should be 5 columns. The program finds a key field of the second type, inserts a new line into the table and fills cells with data, according to a format of a key field. The quantity of the inserted lines corresponds to quantity of points of initial object (a plot or internal object). Among the regulated fields there are the key fields specifying a place of an insert of the scheme of a plot. Generally the structure of elements of the scheme is controlled in dialogue creation of the scheme of object .Figure on full structure of registration is inserted into the report on the place of PICTURE key field. At formation of the documents including some sheets, often there is a necessity to insert various schemes by the contents, in the program it is achieved by use of various key fields of PICTURE figure. For example, for the scheme of borders of the ground plot - PICTURE_1, for the registration form - PICTURE_3, etc. For receiving the specified variant of figure it is necessary to prepare a pattern (to place in necessary places of the document the necessary key fields), in dialogue "Creation of the scheme of object" to set up full structure of displaying. The program at detection in a pattern of PICTURE_i key field will automatically change structure of displaying, by switching-off of visualization of "superfluous" data. The list of "superfluous" data is defined by format of a key field (seelist of the regulated fields ).At creation of the scheme onto it, except for own borders, rotary points and internal objects, it is necessary to put in some cases the next objects. It can be the next sites, streets, roads of the common using and so forth. Processing of the next objects is carried out by uniform algorithm. At formation of the scheme the program, by detour of all sites of the metrics of borders of a plot finds the next objects, defines sites of the metrics topologically coordinated as neighbours and places vector signs: INDEX of NEIGHBOURS ARRANGEMENT. At filling the report by a pattern the key fields GRANICY are processed. The program also finds the next objects by topology, requests their semantics NAME and inserts it into the report in the form of a line describing a site of the metrics. For example, «from н.1 up to н.9 - Petrov's V.Isite», where value «Petrov's V.Isite» - value of semantics of the next object on a site of the metrics from 1 up to 9 points. At absence on any piece of the metrics of a site, it is considered, that here there are no neighbours, and into the report the line of "ground of the common using» is placed. If the next objects have no topological compatibility with a site the program will not find out them. Key fields operated by the user are filled in conformity with values of semantic characteristics or contents of a DB fields. At formation of a pattern of the report such key fields should receive the same names, as a key of the corresponding semantic characteristic or a name of a field in the table of a DB. For example, if semantics «NAME» has SEM9 key, the key field in a pattern will be designated #SEM9#. If the field of the table of a DB has NUMBER name, the key field in a pattern will be had with a following designation #NUMBER#. Program, having found out conformity, will make replacement of a key field onto value of semantics or a field of a DB so many times how many times it is present at a pattern. All fields are filled by a principle: how many times it has met in the document, so many times and it was filled. |