A kind of method that the VG figure is converted to the Visio figure
Technical field:
The present invention is converted to the method for Visio figure with the VG figure, mainly comprises the secondary development of VG figure and Visio figure secondary development method.
Background technology:
In the general engineering design of national grid system at present, it is several that main flow wiring diagram display module is generally VG, Visio etc., yet domestic each software developer is docked the requirement difference of line chart display module at present, thereby has increased the work that graphic designs personnel need redesign.Because workload is big, even and repaint that also to be difficult to the new figure of control consistent with former figure, cause the work efficiency attenuating, can't reach ideal effect, wasted very big human and material resources.
Summary of the invention:
The objective of the invention is to overcome the deficiency of prior art and a kind of easy operation is provided, combination property is strong, accuracy is high automatically the VG figure is converted to the method for Visio figure.
Purpose of the present invention can obtain by following measure: a kind of the VG figure is converted to the method for Visio figure, it is characterized in that, comprise the steps:
Step 1 is made the Visio mould: set up the mold graph pattern according to engineering demand, form the Vss file of Visio figure special use;
Step 2 is obtained Tbl file in the VG figure: the tbl file comprises graphic file and basic mould file, and system reads suitable file under the designated disk catalogue automatically;
Tbl file in the step 3 identification VG graphic file: system reads link information and various attribute information in the VG graphic file;
Step 4 is obtained coordinate and the described Visio mould VSS file of described VG graphic element: some units and coordinate-system and the Visio property of there are differences in the VG figure;
Step 5 coordinate comparison: according to coordinate and the described Visio mould VSS file of described VG graphic element, determine the coordinate difference value of coordinate and the described VG graphic element of newly-generated Visio graphic element, the difference value of coordinate deducts current coordinate points, get its absolute value, be Visio graphic element coordinate points;
The step 6 graphing: the data message that system obtains after according to top-operation, according to the automatic graphing of Viso mould file and add annexation, add the required attribute of equipment according to former figure information in graphing;
Step 7 figure verification: show according to the Visio figure after the conversion, judge the connection status of figure: whether have situations such as isolated island, information be imperfect;
Step 8 figure correction: according to judged result, if there is island state, according to the equipment that certain surface analysis might connect, from being dynamically connected, eliminate isolated island according to the apparatus settings value range; As the imperfect situation of information appears, can point out disappearance information, and with yellow mark warning, replenish relevant information more automatically; If figure is normal, namely enter next step operation; Still incorrect after the correction of system test figure, system is in wrong components figure mark redness, and showing needs the artificial equipment that participates in modification, continues this step after finishing and checks;
The conversion of step 9 figure is normal: form data file, form data file xml according to the link information after the conversion and data message;
The step 10 figure is preserved: figure is saved to sets catalogue or setting data storehouse.
The present invention can produce following good effect compared with the prior art: adopt this to illustrate that described VG graphic file converts the method for Visio graphic file to, only need work designer designated conversion catalogue to get final product, transfer process is finished automatically by system, even appearring drawing in former figure, also can repair automatically problem system, be very easy to designer's work, improve graphic designs progress and efficient, saved resource, also avoided some repeated mistakes.
Description of drawings:
Fig. 1 is the inventive method schematic flow sheet;
Fig. 2 is the former figure of VG electric power;
Fig. 3 is the preliminary figure figure in Visio conversion back.
Embodiment:
Below in conjunction with accompanying drawing the specific embodiment of the present invention is described further:
Shown in Fig. 1 schematic flow sheet of the present invention, comprise the steps:
Step 1 is made the Visio mould: set up the mold graph pattern according to engineering demand, form the Vss file of Visio figure special use;
Step 2 is obtained Tbl file in the VG figure: the tbl file comprises graphic file and basic mould file, and system reads suitable file under the designated disk catalogue automatically;
Tbl file in the step 3 identification VG graphic file: system reads link information and various attribute information in the VG graphic file;
Step 4 is obtained coordinate and the described Visio mould VSS file of described VG graphic element: some units and coordinate-system and the Visio property of there are differences in the VG figure;
Step 5 coordinate comparison: according to coordinate and the described Visio mould VSS file of described VG graphic element, determine the coordinate difference value of coordinate and the described VG graphic element of newly-generated Visio graphic element, the difference value of coordinate deducts current coordinate points, get its absolute value, be Visio graphic element coordinate points;
The step 6 graphing: the data message that system obtains after according to top-operation, according to the automatic graphing of Viso mould file and add annexation, add the required attribute of equipment according to former figure information in graphing;
Step 7 figure verification: show according to the Visio figure after the conversion, judge the connection status of figure: whether have situations such as isolated island, information be imperfect;
Step 8 figure correction: according to judged result, if there is island state, according to the equipment that certain surface analysis might connect, from being dynamically connected, eliminate isolated island according to the apparatus settings value range; As the imperfect situation of information appears, can point out disappearance information, and with yellow mark warning, replenish relevant information more automatically; If figure is normal, namely enter next step operation; Still incorrect after the correction of system test figure, system is in wrong components figure mark redness, and showing needs the artificial equipment that participates in modification, continues this step after finishing and checks;
The conversion of step 9 figure is normal: form data file, form data file xml according to the link information after the conversion and data message;
The step 10 figure is preserved: figure is saved to sets catalogue or setting data storehouse.
Although more than by description of contents and implementation; specifically introduced the present invention; but those skilled in the relevant art should be understood that and in form and details this method be carried out various variations in not breaking away from claims scope, all should be in this method protection domain.