Research on UG Secondary Development Technology

Source: Internet
Author: User

Abstract: ugsoftware is a set of high-end software developed by EDS, which integrates CAD, CAM, and CAE. UG is a general software. Users must perform secondary development on this basis to meet the needs of specialized mold design and improve the design efficiency. This article discusses the second development technology of UG, and focuses on the technology of calling the UG/open api function to design the mold through VC programming.

Keywords: UG secondary development UG/OPEN

1.Introduction

Unigraphics (UG) provides powerful functions in CAD/CAM. However, UG is a general-purpose supporting software system and only has the basic functions of CAD/CAM, no complete computer-aided design/manufacturing functions are provided for specialized products. due to the ever-changing nature of mechanical products, secondary development is required on the selected CAM software platform for specific objects, to design a CAD/CAM System for Special Products with user-friendly, powerful functions and convenient use. this article introduces the second development technology of UG/OPEN UIStyler, UG/open grip and UG/open api.

The UG/Open secondary development module is the secondary development tool set of ugsoftware, which facilitates secondary development. This module allows you to customize and develop the UG system to meet your development needs. UG/Open consists of the following parts: UG/Open Menuscript development tool, user-oriented development of the ugsoftware operation interface, you can add, reorganize, crop, or integrate your own software functions in the UG standard menu without programming. The UG/Open UIStyle development tool is a visual editor, this tool is used to create an interactive interface similar to UG. You can develop an interactive interface independent of the hardware platform for UG/Open Applications, provides direct ugsoftware programming interfaces and supports major advanced languages such as C, C ++, Fortran, and Java. UG/Open GRIP development tool is an internal development language similar to apt ug, with this tool, users can generate special applications for users such as NC automation or automatic modeling.

2 UG/OPEN MenuScript

This tool can be used to implement customized menus. UG/OPEN MenuScript supports the design and modification of the UG main menu and quick pop-up menu, through which the layout of the UG menu can be changed. Add new menu items to execute User GRIP, API secondary development programs, User Tools files, and operating system commands. There are two ways to implement Menu customization by Using UG/OPEN MenuScript programming:

A) add a menu file the developer adds a menu file to the corresponding menu directory. These menu files are edited by the user and meet their requirements. This is a good method,

B) edit the standard menu file. The developer edits the existing standard menu file. This method will change the original interface of UG and cannot be restored. You can use a text editor, such as Notepad, to edit the UG menu file. UG/Open API provides UG/Open API programs and UG/OPEN MenuScript

Program interface functions.

3 UG/OPEN UIStyler

UIStyler is a visualization tool for developing the UG dialog box. The generated dialog box can be integrated with UG, making it easier and more efficient for users to interact with UG. By using this tool, you can avoid complicated GUI programming for graphic user interfaces, and directly combine the basic controls in the dialog box to generate a dialog box with different functions.

Go to UG and click Aplication> UserInterfaceStyler to go to the interface designed in the dialog box. This interface includes a toolbar and three windows: The Object Browser window, the resource editor window, and the Design dialog box window. The application toolbar allows you to quickly click the icon, add and delete controls in the Design dialog box, and design the dialog box interface. The Object Browser window displays information about all controls in the dialog box, select a control to perform corresponding operations in the resource editor window. The resource editor window is used to set and modify the properties and messages of the control. The Design dialog box window is used to display the dialog box interface.

After the interface design is complete, three files are generated when you save the UIStyler prepared dialog box: *. dlg, * _ template. c, and *. h. Where ,*. dlg is the file used to save the graphic interface of the dialog box ;. the H file is the header file of the C language in the UIStyler dialog box, including the identifier of the dialog box and its control and the declaration of the function prototype; * _ template. c is a template file in the c language of the UIStyler dialog box, including various definitions and commands. The main task of a user is to modify the * _ template. c template file and add user code to it to determine the form of the UIStyler dialog box being called and the functions it can implement. You can modify the template file in VC, and then generate a. DLL file by connecting to. h compilation.

The UIStyler tool allows developers to conveniently and quickly design a dialog box consistent with the UG interface style to avoid other complicated programming. It can also be integrated with the results developed using other development tools. The UG/Open UIStyler tool is the same as the UG/Open Menu Script tool and has only one function: UG/Open UIStyler is used for dialog box development, UG/Open Menu Script is used for Menu development.

4 UG/OPEN GRIP

GRIP (Graphics Interactive Programming) is a specialized graphic Interactive Programming language. developers can use GRIP Programming methods to automatically perform most operations under UG. GRIP commands are similar to English words. The syntax is similar to BASIC and FORTRAN. In some cases, for advanced operations, GRIP programming is more effective than UG interaction, almost all of the functions that can be implemented in the UG interaction environment can be implemented using GRIP. UG provides a GRIP language editor named UG/Open GRIP, which can be used to edit, modify, compile, and connect programs. similar to general languages, GRIP has its own syntax structure, program structure, internal functions, and interfaces called with other general language programs. A grip statement is composed of one or several GRIP commands, and the GRIP command is a basic component of the GRIP language. The GRIP command has three representation formats: A) statement format. It is mainly used to generate and edit entities. B) GPA symbol format. GPA is short for Global Parameter Access. It is used to Access the statuses and parameters of various objects in the UG system. C) EDA symbol format. EDA is short for Entity Data Access. It is used to Access the UG database and Access the functional Data of various objects. For example, when interacting with UG in fields such as properties, drawing, dimension tagging, and ry, the parameters can be obtained using commands in the EDA format.

GRIP programming language is an engineer-oriented language, which is simple, easy to learn and easy to use. However, the programming process is long and complex, and all the details of the program must be considered. Therefore, GRIP is often used to develop small programs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.