A kind of is the method for Visio figure by VG Graphic Exchanging
Technical field:
The present invention, by the method that VG Graphic Exchanging is Visio figure, mainly comprises VG figure secondary development and Visio figure secondary development method.
Background technology:
In the current general engineering design of national grid system, it is several that main flow wiring scheme display module is generally VG, Visio etc., but current domestic each software developer is different to the requirement of wiring scheme display module, thus add the work that graphic artists needs to redesign. Owing to workload is big, even and if again draw also very difficult control and newly scheme consistent with former figure, cause working efficiency to lower, ideal effect can't be reached, waste very big human and material resources.
Summary of the invention:
It is an object of the invention to overcome the deficiency of prior art and provide that a kind of simplicity operation, over-all properties are strong, it is automatic that accuracy is high is the method for Visio figure by VG Graphic Exchanging.
The object of the present invention can be obtained by following measure: a kind of is the method for Visio figure by VG Graphic Exchanging, it is characterised in that, comprise the steps:
Step one makes Visio mould: set up mold graph pattern according to engineering demand, forms the VSS file that Visio figure is special;
Step 2 obtains tbl file in VG figure: tbl file comprises figure shape files and basic mould file, and system reads suitable file under designated disk catalogue automatically;
Tbl file in step 3 identification VG figure shape files: system reads connection information and various attribute information in VG figure shape files;
Step 4 obtains the coordinate of described VG graphic element and described Visio mould VSS file: some units and coordinate-system and Visio exist otherness in VG figure;
Step 5 coordinate comparison: according to the coordinate of described VG graphic element and described Visio mould VSS file, determine the coordinate of newly-generated Visio graphic element and the coordinate difference value of described VG graphic element, the difference value of coordinate subtracts current coordinate point, get its absolute value, it is Visio graphic element coordinate point;
Step 6 draws figure: system, according to the data information obtained after top-operation, is automatically drawn figure according to Visio mould file and added connection relation, is drawing while figure attribute needed for former figure information interpolation equipment;
Step 7 figure verifies: according to the Visio figure display after conversion, judge the connection state of figure: whether there is the situations such as isolated island, information is imperfect;
Step 8 figure correction: according to judged result, if there is island state, the equipment likely connected according to certain surface analysis, according to equipment setting range value from being dynamically connected, eliminates isolated island; As the imperfect situation of information occurs, missing information can be pointed out, and with yellow mark warning, more automatically supplement relevant information; If figure is normal, namely enter next step operation; When still incorrect after system check figure correction, system marks redness on wrong components figure, and display needs the artificial equipment participating in amendment, continues this step inspection core after completing;
Step 9 Graphic Exchanging is normal: form data file, forms data file xml according to the connection information after conversion and data information;
Step 10 graphics saving: by graphics saving to setting catalogue or setting data storehouse.
The present invention can produce following positively effect compared with the prior art: adopts the VG picture file translation described in this explanation to become the method for Visio figure shape files, only need work designer's designated conversion catalogue, switching process is completed automatically by system, even if former figure occurs that drawing problem system also can repair automatically, it is very easy to the work of designer, improve graphic designs progress and efficiency, saved resource, it also avoid some repeatability mistakes.
Accompanying drawing illustrates:
Fig. 1 is the inventive method schematic flow sheet;
Fig. 2 is the former figure of VG electric power;
Fig. 3 is preliminary graphic diagram after Visio conversion.
Embodiment:
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further:
As shown in the schematic flow sheet of Fig. 1 the present invention, comprise the steps:
Step one makes Visio mould: set up mold graph pattern according to engineering demand, forms the VSS file that Visio figure is special;
Step 2 obtains tbl file in VG figure: tbl file comprises figure shape files and basic mould file, and system reads suitable file under designated disk catalogue automatically;
Tbl file in step 3 identification VG figure shape files: system reads connection information and various attribute information in VG figure shape files;
Step 4 obtains the coordinate of described VG graphic element and described Visio mould VSS file: some units and coordinate-system and Visio exist otherness in VG figure;
Step 5 coordinate comparison: according to the coordinate of described VG graphic element and described Visio mould VSS file, determine the coordinate of newly-generated Visio graphic element and the coordinate difference value of described VG graphic element, the difference value of coordinate subtracts current coordinate point, get its absolute value, it is Visio graphic element coordinate point;
Step 6 draws figure: system, according to the data information obtained after top-operation, is automatically drawn figure according to Visio mould file and added connection relation, is drawing while figure attribute needed for former figure information interpolation equipment;
Step 7 figure verifies: according to the Visio figure display after conversion, judge the connection state of figure: whether there is the situations such as isolated island, information is imperfect;
Step 8 figure correction: according to judged result, if there is island state, the equipment likely connected according to certain surface analysis, according to equipment setting range value from being dynamically connected, eliminates isolated island;As the imperfect situation of information occurs, missing information can be pointed out, and with yellow mark warning, more automatically supplement relevant information; If figure is normal, namely enter next step operation; When still incorrect after system check figure correction, system marks redness on wrong components figure, and display needs the artificial equipment participating in amendment, continues this step inspection core after completing;
Step 9 Graphic Exchanging is normal: form data file, forms data file xml according to the connection information after conversion and data information;
Step 10 graphics saving: by graphics saving to setting catalogue or setting data storehouse.
Although more than by description of contents and implementation; specifically describe the present invention; but those skilled in the relevant art should be understood that not departing from Claims scope, in form and details present method is carried out various change, all should be in present method protection domain.