Secondary development of machine tool fixture CAD

Structure and usage, detailed discussion of the OLE, database, component engineering drawings and other technologies that need to be solved by D"phi development of machine tool fixture parts library.

Machine tool fixture design is an important and routine task, especially for the design of machine tool fixture parts (usually common parts and standard parts inside the enterprise), such as pressure plate, walking pin, v-block. Although these parts have a similar structure, they are not versatile and the dimensions need to be changed frequently. To this end, the author has carried out targeted secondary development of AutoCAD2000 to meet the needs of engineering applications and reduce the repetitive work to improve design efficiency. AutoCAD2000 provides users with powerful secondary development interfaces through OLE (Object Linking and Embedding) technology. Any development tools that support OLE programming, such as VB, VC, DelphiC++Builder, etc. can be used for secondary development of AutoCAD2000. Here, the author uses the Delphi development tool, which has many superior features and great openness and flexibility. Its open architecture supports multiple database engines. Compared with other development tools, Delphi has high development efficiency and application. Steady, it combines with AutoCAD2000's ActiveXAutomatior technology to provide a powerful interface. 2 System components of the machine tool parts library 2. Information flow of the library The machine tool parts library has the following main functional modules: component library application Program, parts database, photo library and AutoCAD home standard GB2148~GB2269-8 (the size data of all components in the input data is entered into the computer to form a database of multiple data files, each of which has a different size to form a data File. The application process generates the drawing in AutoCAD. The information flow of the Q1R. function module is as shown in the figure. The application calls the drawing of a certain type of fixture in the image library, enters the necessary parameters in the corresponding dialog box, and passes The interface program calls the size of a certain size of the corresponding type of fixture in the component database. Data, and finally call each drawing program to generate a fixture diagram of the specification in the AutoCAD interface.

2.2 Structure of the library There are many types of machine tool fixtures. It is necessary to organize the types of fixtures in order to facilitate the user to quickly retrieve the required components. Refer to the machine tool fixture design manual 3 We divide the fixture parts into 9 categories, nearly 40 different specifications plus (shown here only some specifications). Positioning components: positioning pin, fixed support, adjustable support V-shaped block auxiliary support: automatic adjustment support, push-type auxiliary support guide element: drill sleeve, boring sleeve, bushing, drill sleeve bushing screw setting component: pairing block, tool setting gauge Hand-held positioners, bolt-type positioners, rack-type positioner clamping elements: screws, nuts, bolts, washers, pressure plates, eccentrics, bearings, quick-clamping devices, other clamping parts and other special components : guide plates, thin stops, hinge shafts, screw plugs, etc.

3 Interface and usage of machine tool parts library 3.1 User interface of machine tool parts library The machine tool parts library is a stand-alone application that runs the interface drawing picture on the interface. Run the program and the main interface of the machine tool parts library appears as shown. The interface consists of a "fixture class" drop-down list box, a "fixture small class" drop-down list box, a fixture part type list box, and two command buttons and a graphic frame. The "Jig Type" list box is used to select the nine types of fixtures: positioning components, clamping components, and other specialized components. When one of the categories is selected, the fixture subclass will display the corresponding subclass. When one of the classes is also selected, the fixture part type list box will also display the corresponding part specific type for the user to select.

The graphic box displays different types of part information and content in real time. Click the "Cancel" button to exit the fixture library, and the "OK" button to enter the next level dialog box, as shown. The “Previous” button is used to return to the main interface of the machine tool component library. This form consists of a detailed specification frame bar, a specification list box, an input box, a graphic frame and three command buttons. When you select different fixture component types, different information and content are displayed in real time in the detailed specification frame bar, specification list box, input box, and graphic box. As shown: the model input box selects the A or B type positioning bushing, the graphic frame will display the corresponding structure in real time, and then select the different size d in the specification list box, click the OK button to automatically generate the required in the AutoCAD environment. Fixture diagram.

3.2 The use of the machine tool parts library is based on the selection of the positioning bushing. To run the database application, first select the fixture class "positioning component", then select "positioning pin" in the fixture subclass drop-down list and then select "positioning bushing" in the fixture part type list box, then the graphic frame will display in real time. Schematic diagram of the positioning bushing.

Click the OK button. After the second dialog box appears, select the fixture “Setting 30” and click the OK button. After running the fixture library program, the working diagram of the positioning bushing of model A and inner diameter d30mm is generated directly in AutoCAD, as shown.

4 Key technologies in development The ActiveXAutomation function provided by AutoCAD2000 can be used to achieve secondary development in high-level languages. ActiveXAutomation is an object-oriented programming interface. It uses LE's Automation technology. It is logged into an object that can be manipulated by other programs by referencing AutoCAD's type library file Acad.TLBAutoCAD, and then its object, property, and method can be called for programming. . Users can access all drawing objects and non-drawing objects of AutoCAD. ActiveX is a software re-routing specification for inter-program communication and calling. It provides a mechanism for controlling AutoCAD, that is, every exposed one in AutoCAD. Objects such as circle and line can be controlled by languages ​​such as Delphi and VB that support ActiveX. Each object has its own properties, methods, and can read or change its properties. You can use methods to control the actions of the object. Using this technology to do the second development of AutoCAD to write the database program based on AutoCAD, has obvious superiority, ActiveXAutomation technology provides a new world for the rich secondary development of AutoCAD.

To register, make it a useful control in Delphi. The specific steps are as follows: Select the input class library in the project menu bar; select Add in the Input Class Library dialog box, and browse to the AutoCAD system directory to select the Acad.TLB file: Set the input directory in the dialog box to the Import directory in Delphi's system directory; click Install, the system will prompt to recompile the dclusr50.dpk file, click OK, the system will automatically generate "AutoCADTLB.PAS" file. It is the Acad.TLB class library, which is the interface file that Delphi can recognize; close all files. When prompted to save the dclusr50.dpk file, click "Yes" to register ActiveX. At this point, you will see AutoCAD's visual controls in Delphi's ActiveX Controls page.

4.% Get the AutoCAD entity object After the above operation, you can select the AcadDocument control in the above control page to place it in the form, and set its AutoConnect property to true. Then AutoCAD will be started automatically when this program runs. When AutoCAD is launched, the AcadDocument control in the form is an entity of AutoCAD. The AcadDocument control automatically launches AutoCAD when the program starts, and the AutoCAD application is an independent application platform.

4.4 Establishing the fixture component database The table-driven geometry is applied using a series of design methods suitable for parts and common parts of mechanical parts. By analyzing the fixture component data, a database database is created for each sub-component, and there are several corresponding data tables. The various data related to the design, that is, the above 40 specifications are stored in the form of tables in different databases established by Access. Each table has an independent name and each database has the same structural relationship as the data table. Establish the relationship between the records in the table and the design model, and change the geometry by accessing the records in different tables. Access in the ffice package in engineering design is a good choice, it is enough to achieve the purpose of selecting, querying, adding, deleting, etc. to maintain the database, and has good compatibility with AutoCAD, especially for small databases. It can fully support the SQL structured query statement X5 end language and Delphi secondary development to achieve the parametric design requirements by accessing the database. Practice has proved that it is simple, convenient, fast and reliable, and can save a lot of time and effort for the designer to spend time in engineering drawing.

(Finish)

Stubble Rotary Crusher

Stubble Rotary Crusher,50HP Stubble Rotary Crusher,Dual Shaft Crusher,Tractor Drived Stubble Rotary Crusher

Shandong Dahua Machinery Co.,Ltd , https://www.agrodahua.com