introduction

The use of computers as tools to help engineers design the sum of all practical techniques is called computer-aided juice design. Because this technology can greatly reduce the design cost and design risk of the product, it can shorten the design time of the product, so it has been used in food machinery. Widely used in design. AutoCAD is a highly open architecture software development platform that provides programmers with a strong secondary development environment. The extrusion processing of food is an important new technology in the rapid development of food science and engineering in recent years. The screw is a key component of the extruder, and its performance directly affects the quality and productivity of the expanded product. In view of the particularity of the processed materials in the food and agricultural by-product processing industry, the extruder screw needs to be designed in different configurations to meet the different requirements of various food materials. The results of the traditional design methods are often very different from the actual working conditions, and The design is slow and cannot meet the requirements of modern production. Therefore, it is necessary to use modern design methods and means to systematically and accurately analyze and calculate the screw, thereby improving the design level.

This paper uses the ActiveX technology provided by AutoCAD2006 in COM mode, and develops the automatic drawing software of the screw component of food extruder with the object-oriented programming language C# under NET platform. The design accuracy is greatly improved and the design cycle is shortened.

1AutoCADActiveX technology

ActiveX technology is ActiveX automation interface technology. ActiveX technology is based on object linking and embedding. Formerly known as 0LEutomation (ObjectLinkingandEmbedding) technology, it is an extension and development of OLE automation technology, it is suitable for OLE objects and ActiveX objects. With ActiveX technology, programming allows users to easily manipulate another application in their own applications. The standard allows another Windows application to be controlled by a Windows application through explicit objects, which means that the called program exposes its own object architecture for caller reference, which is the essence of object-oriented programming techniques. The application object in Automation is the highest level object, and other objects are derived from it at a certain level. Automation is composed of client programs and service programs. A client program is a program that can manipulate objects in another application. A service program is a program that exposes its own objects to the corresponding client program. A service program is a controlled object that contains a series of exposed objects that can be automated as long as the server provides a certain interface.

2NET and AutoCAD connection

Take C# as an example. On the platform, create a new ClassLibrary project, and then add acdbmgb.dll and acmGB.dll in the AutoCAD2006 installation directory as references to the project. These two files contain all the outsourced classes in the NETAPI.

Then add the following statement to the class that will use the NETAPI to reference the NETAPI namespace. The statement that needs to be added is as follows:

usingAutodesk.AulOCAD.ApplicationServices;

usingAutodesk.AutoCAD.DatabaseServices;

usingAutodesk.AutoCAD.Runtime;

usingAutodesk.AutoCAD.Geometryj

Among the various secondary development tools in AutoCAD, ActiveXAutomation technology can easily use a variety of object-oriented advanced development languages, providing developers with a variety of optional development tools, but its functions are slightly insufficient, especially Object-oriented features are not well supported. NET is Microsoft's new development platform. It is based on the NET platform for secondary development of AutoCAD. It can make full use of the advantages of NET, but in the current NETAPI, there are quite a few ObjectARX functions that are not yet packaged into NETAPI. By combining the two methods through COM, you can learn from each other and play a higher political rate.

Application example of 3C# in extruder screw design system

3.1 Research background

In recent years, screw extrusion technology has become more and more widely used in food machinery applications. Among them, screw extruders have a place in various fields such as grain and potato food processing, oil processing, and modified starch processing. The screw extruder is a multi-input and multi-output food processing machine. The internal mechanism is not very clear. The production process is characterized by nonlinearity, ambiguity and variability. The screw is an important core component of the screw extruder. The processing of different foods has different requirements on the shape and geometric parameters of the screw. The conventional universal screw often cannot meet the requirements of the ever-changing food processing, which requires different The specific food processing is quickly and accurately set to the corresponding screw.

3.2 Design guiding ideology

Using the parametric modeling method, the constraint relationship between the graph and the size parameter is first established. Each variable size parameter is represented by a variable. The user can re-enter each parameter in the parameter input dialog box according to the specific design requirements, so that the parameter is assigned to the parameter. The variable textBox.Text is passed to the program. When drawing, if you need to modify different size parameters, you can get different specifications. The basic parameter interface of the screw parameterization design is shown in Figure 1.