Research and Development of Document Automatic Generation System

zhaozj2021-02-16  62

This paper mainly introduces the function of the equipment guarantee scheme generation system, which gives the model of the equipment guarantee scheme generation system, and discusses the technical difficulties of programming implementation under VC. 1.1 Generate the Situation Situation Situation is generated on the electronic map system (including the chart). The commander can perform the operation on the desired map, set the equipment support point, select the equipment guarantee type, set the equipment guarantee force, plan equipment guarantee time and calibration protection intentions. Therefore, the implementation of this function needs to develop a set of GIS system (geographic information systems), including vector graphics systems, including military standards, equipment support information database management system, vector graphics system, and database management system connection, information Query function, spatial information statistics and analysis functions, etc. 1.2 Generating Protection Solution Protection Schemes can be customized by users. Here, there is a guide to the guarantee scheme generated, mainly for the equipment support tasks and equipment support forces to achieve our determination, basically meet the needs of users. Data Description of Equipment Protection Schemes consists of the following elements: l Prospecting object L Safeguards to ensure environment l Guaranteed demand analysis l Existing security capacity analysis l Security determination L command mechanism organizational and setup L-safe task distinguished (sub-task) L Strength Group L Communication and Alert Defense Demand L Security Action Plan l Security Coordination Plan l Supporting Environmental Construction L Quality of Environmental Construction L. Issuance 1.3 Generating Protection Document Equipment Protection Scheme The Different Forms: Preserved in Database Protection scheme data describes and saves the secure document of various files. Therefore, we integrate the Office system in the equipment support scheme generation system so that you can generate Word, Excel, RTF, and PowerPoint type documents in this system. 1.4 Automatic Submission Program Document When the user uses the GIS system to generate a safe situation, use the wizard to generate a safeguard solution, after using the integrated Office system to formulate the secure document, the automatic submission scheme system can use the user's needs to put the database and files in the database and file all of this security task. Relevant data is extracted, generating a full-specific or issued regulation document. 2 The model of the equipment guarantee scheme generation system is in the component of the equipment guarantee command automation platform, using the "Motherboard Plug-in" constructor [2], solves the distribution, flexibility and openness of the equipment guarantee command automation system, so that The system can be flexibly restructured and expanded according to different combat cases, and can be upgraded with the development of various new technologies and add new subsystems. The new subsystem "hangs into the" platform in the form of "insert" in the form of "insert", which can solve the interconnection, interoperability, and interoperability issues between different types of systems in joint guarantees. The equipment support scheme generation system is "plug-in" embedded in the equipment guarantee command automation platform 3 Equipment protection scheme generation system development instance equipment support scheme generation system In programming implementation, the main technical difficulties are: electronic map loading, vector graphics system Connection to the database management system, the statistics and analysis of spatial information in the GIS system, the synergy process of the guarantee scheme, the integration of the Office system, automatically submits the scheme documentation and database access. Here mainly combines VC to briefly introduce some difficult problems (project name EADPMS). 3.1 Adding a template According to the needs of this system, we add a guaranteed state map template, Office Assurance Document Template and Protection Scheme Wizard Template. First, the related object pointer is defined in the EADPMS.h header file. CTypedPtrList m_myFileTypeList; // list of file protection posture template CTypedPtrList m_officeFileTypeList; list CTypedPtrList // Office document template m_wizardList; // guarantee scheme Wizard Link list then add templates in an EADPMS.CPP file.

BOOL CEADPMSApp :: InitInstance () {... CMultiDocTemplate * pDocTemplate; (1) increase the protection situation template pDocTemplate = new CMultiDocTemplate (IDR_TSTTYPE, RUNTIME_CLASS (CTstDoc), RUNTIME_CLASS (CTstMDIChildFrame), // custom MDI child frame RUNTIME_CLASS (CTstView)); AddDocTemplate (pDocTemplate); m_myFileTypeList.AddTail (pDocTemplate); (2) increase the Office document template pDocTemplate = new CMultiDocTemplate (IDR_MYWORDTYPE, RUNTIME_CLASS (CMyWordDoc), RUNTIME_CLASS (CRTFChildFrame), // custom MDI child frame RUNTIME_CLASS (CMyOfficeView)); pDocTemplate-> SetContainerInfo (IDR_OFFICETYPE_CNTR_IP); AddDocTemplate (pDocTemplate); m_officeFileTypeList.AddTail (pDocTemplate); (3) increase the protection scheme Wizard template AddWizardTemplate (new CWizardTemplate (IDR_SPECIALTYPLAN, RUNTIME_CLASS (CSpecialtyPlan))); ...} 3.2 Office integration to the system by Ole Implement the embedding of Office. The EADPMS project generates a CMYOFFICEDOC class based on the Coledocument class, and we activate the corresponding Office office software in this class. The CLSID code for Word, PowerPoint, Excel chart, and Excel worksheets is: {0x00020906, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0X46}, {0x64818D10, 0X4F9B, 0x11cf, { 0x86, 0xea, 0,0 xaa, 0,0 xb9,0 x29,0 xe8}}, {0x00020821, 0, 0, {0XC0, 0, 0, 0, 0, 0, 0X46}} and {0x0020820, 0, 0 {0XC0, 0, 0, 0, 0, 0, 0, 0x46}}. This way we can activate the Office system through the CLSID code in MyOfficeDoc.cpp. BOOL CMyOfficeDoc :: OnNewDocument () {... COfficeDocItem * pItem = new COfficeDocItem (this); pItem-> m_lpStorage = m_lpRootStg; pItem-> m_lpStorage-> AddRef (); pItem-> CreateNewItem (CLSID) // CLSID value by activating Office Application ...} 3.3 The statistics and analysis of spatial information in the GIS system is a basic function of the GIS system. The essence is the spatial topology of graphic elements to achieve statistics on information data through graphical elements. analysis. It is mainly completed by the following two steps: on the vector graphics, the vector graphics elements that require statistics and analysis are obtained according to the topology of various graphical elements, and the selection methods of graphic elements are involved. Mainly select, regional selection, line class intersection operation selection and region intersection operation selection. Statistics and analysis of the nature data information of the selected graphic elements. The spatial information statistics and analysis functions of the GIS system are not to make statistics and analysis of vector graphics elements, but to achieve statistical and analysis functions of nature data as the intermediary of vector graphic elements. That is to say, to analyze the equipment support data information in the data table of the database management system.

3.4 Automatic Submission Program Document Auto Submission Program Document The main function is to extract the equipment support scheme data recorded in the data table of the database management system, and save it in the form of a table or spreadsheet in Office. The equipment support scheme data is implemented by a series of data views, which are derived from the original data table of the equipment guarantee scheme, and is generated according to the output requirements of the program document. The automatic generation of the document is done by 2 functions, and the function CopyFromTable automatically generates document forms in the form of it. void CopyFromTable (CSession * pSession, _Document * pdoc, LPCTSTR strTableName) {... reads view pBind = new MYBIND [m_ulFields]; rs.CreateAccessor (m_ulFields, pBind, sizeof (MYBIND) * m_ulFields); for (ULONG l = 0 L MoveNext () == S_OK) NRECORDS ; Otables.Add (Orange, NRecords 1, M_ulfields, Colevariant ((Short) 1), Colevariant ((Short) 1)); ... Import Data IF (((Crowset * ) -> movefirst () == s_ok); do {ncol = 1; while (ncol MoveNext () == s_ok); ...} Function OutputFromTable From the data view in need in need Automatically generate document text.

转载请注明原文地址:https://www.9cbs.com/read-22518.html

New Post(0)