Summary of the invention
In view of this, the invention provides a kind of lightweight, the plug-in unit of efficient, extendible AutoCAD suspension physical watermarks realize system and method, existing AutoCAD watermarking process functional configuration is dumb, software application efficiency is low for solving, redundance is large, the technical matters of poor stability.
The plug-in unit of AutoCAD suspension physical watermarks realizes a system, and it comprises:
Physical watermarks plug-in version controller, upgrades the physical watermarks plug-in unit of AutoCAD Bootload, the CAD document of this physical watermarks plug-in unit corresponding A utoCAD software current active for dynamic realtime;
Physical watermarks detecting device, for checking whether the CAD document of current active exists just in other physical watermarks occupied, when there are not other physical watermarks occupied, starts the function of document audiomonitor; When there are other physical watermarks occupied, generating and ejecting the physical watermarks plug-in unit that warning prompt user selects to cancel or continue loading the loading of physical watermarks plug-in version controller;
Document audiomonitor, after physical watermarks plug-in unit for loading at physical watermarks plug-in version controller completes, obtain the essential information of the CAD document of current active, described essential information comprises size, the border of CAD document, the size of AutoCAD software forms, border, and computed screen resolution;
Physical watermarks editing machine, for complete at document audiomonitor obtain current active CAD document essential information after, load the corresponding window that physical watermarks user is arranged, to respond the setting of user to the physical watermarks by loaded and displayed, the content of the physical watermarks arranged comprises physical watermarks displaying contents, the layout of physical watermarks content, the display position of physical watermarks in the CAD document of current active, physical watermarks is with window variation pattern;
Physical watermarks display, for the physical watermarks loaded in display, and for starting action listener function, make the displaying contents of physical watermarks and mode can immediately and the operation of user carry out interaction.
A plug-in unit implementation method for AutoCAD suspension physical watermarks, it comprises the steps:
S1, dynamic realtime upgrade the physical watermarks plug-in unit of AutoCAD Bootload, the CAD document of this physical watermarks plug-in unit corresponding A utoCAD software current active;
Whether the CAD document of S2, inspection current active exists just in other physical watermarks occupied, when there are not other physical watermarks occupied, jumps to step S3; When there are other physical watermarks occupied, generating and ejecting the physical watermarks plug-in unit that warning prompt user selects to cancel or continue loading in load step S1;
S3, physical watermarks plug-in version controller load physical watermarks plug-in unit complete after, obtain the essential information of the CAD document of current active, described essential information comprises size, the border of CAD document, the size of AutoCAD software forms, border, and computed screen resolution;
S4, complete obtain current active CAD document essential information after, load the corresponding window that physical watermarks user is arranged, to respond the setting of user to the physical watermarks by loaded and displayed, the content of the physical watermarks arranged comprises physical watermarks displaying contents, the layout of physical watermarks content, the display position of physical watermarks in the CAD document of current active, physical watermarks is with window variation pattern;
S5, the physical watermarks loaded in display, and for starting action listener function, make the displaying contents of physical watermarks and mode can immediately and the operation of user carry out interaction.
Advantageous Effects: the plug-in unit of AutoCAD suspension physical watermarks of the present invention realizes system and method by AutoCAD suspension physics watermark inserter, take plug-in unit as dynamic load and the management that logical block achieves suspension physical watermarks, what make that user cannot be random copies CAD document and revises, the Intellectual Property Protection of perfect computer-aided engineering design AutoCAD software and function; Simultaneously not Existence dependency relationship between AutoCAD suspension physics watermark inserter and original cad data, thus reduce the security risk of CAD document.
Embodiment
In embodiments of the present invention, the kit ObjectARX that software environment adopts AutoDesk company to provide for the secondary development on AutoCAD platform, in conjunction with Microsoft.NET Framework Development Framework, realized management and the use of CAD document suspension physical watermarks by plug-in unit.
As shown in Figure 1, realize in system at the plug-in unit of the AutoCAD suspension physical watermarks of the embodiment of the present invention, it comprises:
Physical watermarks plug-in version controller 10, upgrades the physical watermarks plug-in unit of AutoCAD Bootload, the CAD document of this physical watermarks plug-in unit corresponding A utoCAD software current active for dynamic realtime.
Wherein different CAD documents can have the different physical watermarks plug-in unit arranged by repeated loading.
The dynamic realtime that can be realized physical watermarks plug-in unit by physical watermarks plug-in version controller 10 is upgraded, and can provide CAD later release by compatible subscribers, also conveniently carries out the optimization of physical watermarks pin function and expansion simultaneously.Alternatively, carry out synchronous latest edition by on-line/off-line update module, guarantee that the physical watermarks plug-in unit that user uses has good compatibility, security, and function the most perfect.During the upgrading of off-line off line, physical watermarks plug-in version controller 10 generates and shows user downloads AKU signal language in designated links, and user manually can complete the synchronous upgrading of physical watermarks plug-in unit latest edition.
Alternatively, described physical watermarks plug-in version controller 10 for:
In the main interface of AutoCAD, by the mode of order line, load physical watermarks plug-in unit dynamic link library dll file compiled in advance.
In loading procedure, interrupt loading procedure, whether the version of on-line checkingi physical watermarks plug-in unit up-to-date, if without network environment, then give tacit consent to loaded for latest edition plug-in unit.
Call the database service in AutoCAD software, detect in the self-defined object of the CAD document of current active, whether store the relevant information of this physical watermarks plug-in unit, if have, show the essential information of the physical watermarks arranged, and point out user whether to continue to reload plug-in unit, if not, continue the loading of physical watermarks plug-in unit.
Physical watermarks detecting device 20, for checking whether the CAD document of current active exists just in other physical watermarks occupied, when there are not other physical watermarks occupied, starts the function of document audiomonitor 30; When there are other physical watermarks occupied, generating and ejecting the physical watermarks plug-in unit that warning prompt user selects to cancel or continue loading the loading of physical watermarks plug-in version controller 10.
For the CAD document of current active, by physical watermarks detecting device 20, the physical watermarks plug-in unit after loading will check whether the document has existed other physical watermarks and used.
Alternatively, described physical watermarks detecting device 20 for:
Detect the computed hardware of active user and operating system environment.
Whether there are relevant application program or process to bind size, the change in location event of the CAD document of current active by detecting, judge whether that other external physical watermark for AutoCAD software exists.
By calling the open application interface API of the bag ObjectARX that develops software of AutoCAD software, detecting and whether having the internal physical watermark of AutoCAD software in operation.
When having external physical watermark and/or internal physical watermark, record and show display information and the status information of the physical watermarks of this existence, prompting user continues the physical watermarks plug-in unit loading the loading of physical watermarks plug-in version controller 10, or uses existing physical watermarks; If when external physical watermark and/or internal physical watermark not detected, continue and complete the loading of the physical watermarks plug-in unit of physical watermarks plug-in version controller 10.
Document audiomonitor 30, after physical watermarks plug-in unit for loading at physical watermarks plug-in version controller 10 completes, obtain the essential information of the CAD document of current active, described essential information comprises size, the border of CAD document, the size of AutoCAD software forms, border, and computed screen resolution.
Document audiomonitor 30 is one of nucleus modules of the embodiment of the present invention, and its major function is the essential information obtaining and manage current active CAD document and AutoCAD software Main form.Due to the physical watermarks that the embodiment of the present invention adopts, do not rely on the visible entity in CAD document model space, be suspended on CAD document, therefore build contacting between CAD document and physical watermarks, to make the state of physical watermarks real-time response CAD document change, then seem particularly important.Document audiomonitor 30 can as the tie connected between CAD document and physical watermarks, by reading size, the positional information of CAD document and AutoCAD software Main form, and in conjunction with the resolution information of computer screen, by the mode of action listener, realize the real-time refreshing that physical watermarks changes with document.
Alternatively, described document audiomonitor 30 for:
Obtain the handle of the CAD document of current active.
By the object number ObjectId of the handle acquiring document of the CAD document of acquisition.
The coordinate information of CAD document at the parent window relative to AutoCAD software is read by ObjectId.
The moving event monitoring overall mouse carrys out the CAD document of binding physical watermark and current active, namely physical watermarks with the change of CAD documents location, size the information of corresponding change.
By call operation systematic difference routine interface WinAPI, read the resolution information of present displays, and in conjunction with the parent window size of AutoCAD software and position, by display coordinate and CAD document being changed at the coordinate information of the parent window relative to AutoCAD software, realize the global registration of physical watermarks and CAD documents location, size.
Physical watermarks editing machine 40, for complete at document audiomonitor 30 obtain current active CAD document essential information after, load the corresponding window that physical watermarks user is arranged, to respond the setting of user to the physical watermarks by loaded and displayed, the content of the physical watermarks arranged comprises physical watermarks displaying contents, the layout of physical watermarks content, the display position of physical watermarks in the CAD document of current active, physical watermarks is with window variation pattern.
The various information integrated management to physical watermarks can be realized by physical watermarks editing machine 40.By the mode that UI is mutual, response user is arranged the preference of physical watermarks displaying contents, mode, state, meets the physical watermarks loaded and displayed of different user, different demand.Specifically comprise: in physical watermarks, the layout setting of displaying contents, physical watermarks are from the mode etc. in the layout setting enlivened in document, the change of physical watermarks response document.Meanwhile, the configuration information of present physical watermark will be stored in the appointed area of enlivening CAD inside documents.
Alternatively, described physical watermarks editing machine 40 for:
Call the PaletteSet class in AutoCAD software under Autodesk.AutoCAD.Windows NameSpace, build with the on all four physical watermarks control panel of AtuoCAD software interface style, for user carry out physical watermarks editor, control with storage operate.
The interactive user interface UI design function provided by PaletteSet class arranges physical watermarks information for user, and the information of setting comprises physical watermarks displaying contents, display position, size, font, color.
Preserve in the named object dictionary of physics watermark information custom entities in CAD literary composition crotch.
Judge whether the named object dictionary of physical watermarks exists, when there is the named object dictionary of record physical watermarks, according to this information updating dictionary arranged of user; When there is not the named object dictionary of record physical watermarks, newly-built custom entities, and preserve physics watermark information by custom entities named object dictionary.
Physical watermarks display 50, for the physical watermarks loaded in display, and for starting action listener function, make the displaying contents of physical watermarks and mode can immediately and the operation of user carry out interaction.
Physical watermarks display 50, by reading the information of the current setting of physical watermarks editing machine 40, completes the real-time display of physical watermarks.
Alternatively, described physical watermarks display 50 for:
In the CAD document of current active, build physical watermarks custom entities, and add this custom entities the model space of CAD document to; This custom entities is for realizing the Presentation Function of physical watermarks.
Open the action listener function of the CAD document of current active, to realize the Real-Time Monitoring to the change of current active CAD documents location, when the position of CAD document changes, in the physical watermarks custom entities of the model space of CAD document, be again loaded into the positional information of physical watermarks, and refresh the physical watermarks showing and be again loaded into.
Alternatively, described physical watermarks display 50 also for:
The attribute redefined required for selection physical watermarks custom entities object or method.As " deletion ", " copying " operation.
Build ObjectOverrule class, the attribute of the existing definition of heavy duty and method.As invalid in function such as needs realization " deletion ", " copying " etc.
When user calls attribute and the method for the existing definition of heavy duty, continue operation by Autodesk.AutoCAD.Runtime.Exception throw exception to stop user.
Generate and show the operation extremely going out active user and need to perform.As pointed out user: " this object does not allow to delete and copy ".
As shown in Figure 2, the embodiment of the present invention also provides a kind of plug-in unit implementation method of AutoCAD suspension physical watermarks, and it comprises the steps:
S1, dynamic realtime upgrade the physical watermarks plug-in unit of AutoCAD Bootload, the CAD document of this physical watermarks plug-in unit corresponding A utoCAD software current active.
Whether the CAD document of S2, inspection current active exists just in other physical watermarks occupied, when there are not other physical watermarks occupied, jumps to step S3; When there are other physical watermarks occupied, generating and ejecting the physical watermarks plug-in unit that warning prompt user selects to cancel or continue loading in load step S1.
S3, physical watermarks plug-in version controller 10 load physical watermarks plug-in unit complete after, obtain the essential information of the CAD document of current active, described essential information comprises size, the border of CAD document, the size of AutoCAD software forms, border, and computed screen resolution.
S4, complete obtain current active CAD document essential information after, load the corresponding window that physical watermarks user is arranged, to respond the setting of user to the physical watermarks by loaded and displayed, the content of the physical watermarks arranged comprises physical watermarks displaying contents, the layout of physical watermarks content, the display position of physical watermarks in the CAD document of current active, physical watermarks is with window variation pattern.
S5, the physical watermarks loaded in display, and for starting action listener function, make the displaying contents of physical watermarks and mode can immediately and the operation of user carry out interaction.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, in the above description according to the functional composition and the step that generally describe each example.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not exceed scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in any other forms of storage medium known in random access memory, internal memory, ROM (read-only memory), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Be understandable that, for the person of ordinary skill of the art, other various corresponding change and distortion can be made by technical conceive according to the present invention, and all these change the protection domain that all should belong to the claims in the present invention with distortion.