Disclosure of Invention
The invention aims to solve the technical problem of providing a project file retrieval method and a project file retrieval system based on EPLAN software, which can improve the convenience of project file retrieval.
In a first aspect, the present invention provides a project file retrieval method based on EPLAN software, including the steps of:
step S10, setting an item storage path, obtaining item numbers of item files, creating folders in the item storage path based on the item numbers, and storing the item files in the folders;
Step S20, creating a search project window for searching the project file based on a Winform control;
Step S30, declaring that the EPLAN software is used for calling the search term operation of the search term window;
step S40, declaring the menu name of the search term operation as a search term, and inserting the search term into a menu of EPLAN software;
and step S50, calling a search term window to search the term file based on the search term.
Further, the step S10 specifically includes:
Setting an item storage path for storing the item file, acquiring an item number based on a path variable of the item file, creating a folder in the item storage path by taking the item number as a folder name, and storing the item file into a folder corresponding to the item number.
Further, in the step S20, the search term window is provided with an input box, a search button, a result display list, a search status display field, an OK button, and a Cancel button.
Further, the input box is used for inputting a search field of a search project file, the search button is used for triggering search operation, the result display list is used for displaying search results and at least comprises a project name, a project number, a file path and a file type, the search state display column is used for displaying search states and search result statistical information, the OK button is used for opening the selected project file, and the cancer button is used for canceling the search operation.
Further, the step S50 specifically includes:
The search item calls a search item window based on the received click signal, a search button of the search item window automatically executes search of a search field acquired from an input box under the item storage path based on the received click signal, item information of the searched item file is displayed in a result display list, an OK button of the search item window opens the selected item file based on the received click signal, and search of the item file is completed;
The item information includes at least an item name, an item number, a file path, and a file type.
In a second aspect, the present invention provides an EPLAN software-based project file retrieval system, including the following modules:
The project file storage module is used for setting a project storage path, obtaining a project number of a project file, creating a folder in the project storage path based on the project number, and storing the project file into the folder;
the search term window creation module is used for creating a search term window for searching the term file based on the Winform control;
a search term operation declaration module for declaring a search term operation of EPLAN software for invoking the search term window;
The menu name declaring module is used for declaring the menu name of the search item operation as a search item and inserting the search item into a menu of the EPLAN software;
and the retrieval module is used for calling a search term window to retrieve the project file based on the search term.
Further, the project file storage module specifically includes:
Setting an item storage path for storing the item file, acquiring an item number based on a path variable of the item file, creating a folder in the item storage path by taking the item number as a folder name, and storing the item file into a folder corresponding to the item number.
Further, in the search term window creation module, the search term window is provided with an input box, a search button, a result display list, a search status display column, an OK button and a cancer button.
Further, the input box is used for inputting a search field of a search project file, the search button is used for triggering search operation, the result display list is used for displaying search results and at least comprises a project name, a project number, a file path and a file type, the search state display column is used for displaying search states and search result statistical information, the OK button is used for opening the selected project file, and the cancer button is used for canceling the search operation.
Further, the retrieval module specifically comprises:
The search item calls a search item window based on the received click signal, a search button of the search item window automatically executes search of a search field acquired from an input box under the item storage path based on the received click signal, item information of the searched item file is displayed in a result display list, an OK button of the search item window opens the selected item file based on the received click signal, and search of the item file is completed;
The item information includes at least an item name, an item number, a file path, and a file type.
The invention has the advantages that:
by setting the item storage path, the item files are stored in folders named by item numbers under the item storage path, namely, the storage path of the item files of the EPLAN software is standardized, then a search item window is created based on a Winform control, after the search item operation and the menu name of the search item window are declared, a menu with the menu name of the search item is inserted into the menu of the EPLAN software, the search item window can be called by clicking the search item, search fields can be input in the search item window quickly, the storage path is not required to be memorized as in the prior art, and convenience and efficiency of the search of the item files are greatly improved.
Detailed Description
The technical scheme of the embodiment of the application has the general ideas that the EPLAN software is subjected to secondary development, the project number of the project file is used as a folder name to automatically create a folder in the project storage path so as to standardize the storage path of the project file, a search project is embedded in a menu of the EPLAN software and used for calling a search project window created based on a Winform, the search project window is used for realizing the input of a search field and the display of a search result, a user can conveniently search in the EPLAN software, the search project window searches in the project storage path according to the search field input by the user, and the project file containing the search field in the project name is matched so as to simplify the step of searching the project file and improve the convenience of searching the project file.
Referring to fig. 1 to 3, a preferred embodiment of a project file searching method based on EPLAN software of the present invention includes the following steps:
step S10, setting an item storage path, obtaining item numbers of item files, creating folders in the item storage path based on the item numbers, and storing the item files in the folders;
Step S20, creating a search project window for searching the project file based on a Winform control;
step S30, declaring the operation of the search item for the EPLAN software to call the search item window, wherein the declared codes are as follows:
[DeclareAction("ProjectSearch")]
publicvoidSearchMacrosVoid()
{
ProjectSearchform=newProjectSearch();
form.ShowDialog();
return;
}
the code defines "ProjectSearch" as a search term operation (EPLAN operation) that invokes a search term window.
Step S40, declaring the menu name of the search item operation as a search item, and inserting the search item into a menu of the EPLAN software, wherein the code is as follows:
[DeclareMenu]
publicvoidMenuFunction()
{
EPLAN.EplApi.Gui.Menumenu=newEPLAN.EplApi.Gui.Menu();
menu. Addmenu item ("search term",
"ProjectSearch",
"Find and open item",
35340,// Is inserted after "item" - "close item
1,
false,
false);
return;
}
And step S50, calling a search term window to search the term file based on the search term.
The step S10 specifically includes:
Setting an item storage path for storing the item file, acquiring an item number based on a path variable of the item file, creating a folder in the item storage path by taking the item number as a folder name, and storing the item file into a folder corresponding to the item number. When a plurality of item files are used for the same item number, then they are stored under the same folder.
In the step S20, the search term window is provided with an input box, a search button, a result display list, a search status display field, an OK button and a Cancel button.
The input box is used for inputting a search field of a search project file, the search button is used for triggering search operation, the result display list is used for displaying search results and at least comprises a project name, a project number, a file path and a file type, the search state display column is used for displaying search states and search result statistical information, the OK button is used for opening the selected project file, and the cancer button is used for canceling the search operation.
The input box supports limiting the search scope, such as setting and searching all files containing suffixes, and specifically comprises an EPLAN item (. Elk), an EPLAN item with revision information (. Ell), a packed EPLAN item (. Elp), an archived EPLAN item (. Els), an archived and packed EPLAN item (. Elx), a finished EPLAN item (. Elr), a temporary EPLAN reference item (. Elt) and the like, so that the flexibility and the efficiency of the search are further improved.
The step S50 specifically includes:
The search item calls a search item window based on the received click signal, a search button of the search item window automatically executes search of a search field acquired from an input box under the item storage path based on the received click signal, item information of the searched item file is displayed in a result display list, an OK button of the search item window opens the selected item file based on the received click signal, and search of the item file is completed;
The item information includes at least an item name, an item number, a file path, and a file type.
The invention relates to a project file retrieval system based on EPLAN software, which comprises the following modules:
The project file storage module is used for setting a project storage path, obtaining a project number of a project file, creating a folder in the project storage path based on the project number, and storing the project file into the folder;
the search term window creation module is used for creating a search term window for searching the term file based on the Winform control;
The search term operation declaration module is used for declaring the search term operation of the EPLAN software for calling the search term window, and the declared codes are as follows:
[DeclareAction("ProjectSearch")]
publicvoidSearchMacrosVoid()
{
ProjectSearchform=newProjectSearch();
form.ShowDialog();
return;
}
the code defines "ProjectSearch" as a search term operation (EPLAN operation) that invokes a search term window.
The menu name declaring module is used for declaring the menu name of the search item operation as a search item and inserting the search item into a menu of the EPLAN software, and the code is as follows:
[DeclareMenu]
publicvoidMenuFunction()
{
EPLAN.EplApi.Gui.Menumenu=newEPLAN.EplApi.Gui.Menu();
menu. Addmenu item ("search term",
"ProjectSearch",
"Find and open item",
35340,// Is inserted after "item" - "close item
1,
false,
false);
return;
}
And the retrieval module is used for calling a search term window to retrieve the project file based on the search term.
The project file storage module specifically comprises:
Setting an item storage path for storing the item file, acquiring an item number based on a path variable of the item file, creating a folder in the item storage path by taking the item number as a folder name, and storing the item file into a folder corresponding to the item number. When a plurality of item files are used for the same item number, then they are stored under the same folder.
In the search term window creation module, the search term window is provided with an input box, a search button, a result display list, a search state display column, an OK button and a cancer button.
The input box is used for inputting a search field of a search project file, the search button is used for triggering search operation, the result display list is used for displaying search results and at least comprises a project name, a project number, a file path and a file type, the search state display column is used for displaying search states and search result statistical information, the OK button is used for opening the selected project file, and the cancer button is used for canceling the search operation.
The input box supports limiting the search scope, such as setting and searching all files containing suffixes, and specifically comprises an EPLAN item (. Elk), an EPLAN item with revision information (. Ell), a packed EPLAN item (. Elp), an archived EPLAN item (. Els), an archived and packed EPLAN item (. Elx), a finished EPLAN item (. Elr), a temporary EPLAN reference item (. Elt) and the like, so that the flexibility and the efficiency of the search are further improved.
The retrieval module specifically comprises:
The search item calls a search item window based on the received click signal, a search button of the search item window automatically executes search of a search field acquired from an input box under the item storage path based on the received click signal, item information of the searched item file is displayed in a result display list, an OK button of the search item window opens the selected item file based on the received click signal, and search of the item file is completed;
The item information includes at least an item name, an item number, a file path, and a file type.
In summary, the invention has the advantages that:
by setting the item storage path, the item files are stored in folders named by item numbers under the item storage path, namely, the storage path of the item files of the EPLAN software is standardized, then a search item window is created based on a Winform control, after the search item operation and the menu name of the search item window are declared, a menu with the menu name of the search item is inserted into the menu of the EPLAN software, the search item window can be called by clicking the search item, search fields can be input in the search item window quickly, the storage path is not required to be memorized as in the prior art, and convenience and efficiency of the search of the item files are greatly improved.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.