Programming in Pro/ENGINEER Wildfire: Higher C++ Program Lower Micro Programming
Programming in Pro/ENGINEER Wildfire: Higher C++ Program Lower Micro Programming
Interactive graphical programming is carried in Pro/E at two different levels. At the higher level, C++ program are supported through Pro/ENGINEER API Toolkit. At lower level, a micro programming environment, Pro/E PROGRAM Tool, is supported. These programming environments serve different needs. It is very typical for a CAD system to support at least these two levels of interactive graphics programming.
automating the production of Pro/ENGINEER deliverables, such as BOMs, drawings, and manufacturing
operations
Pro/INTRALINK Access
The Pro/E API Toolkit provides complete access to the information within the Pro/INTRALINK environment, allowing customers to further leverage the product information contained within Pro/INTRALINK. Specifically, this functionality allows: Integration with MRP/ERP (Material Requirement Planning/Enterprise Resource Planning) systems Custom client applications, such as Web integrated clients Triggered verification, notification and enforcement of business process actions
The Pro/E Program environment, on the other hand, support quick and relatively straightforward interactive graphical programming in Pro/E for every users. The programming environment is simply Pro/E and Microsoft Notepad or Word. One can enter the Pro/E PROGRAM environment, by clicking Tools > Program from the pull-down menu in the Pro/E PART or ASSEMBLY mode. To show or edit the program, one can click Show Design or Edit Design from the PROGRAM menu. recorded modeling actions + data input/output + controls
Input Variables
The INPUT statement must define the name and type of the variable. Variable names must always begin with a character. The following variable types are supported: Number String: This enables the user to enter parameters or model names. Logical (YES_NO): Enter either Y or N. An example: INPUT THICKNESS NUMBER "Enter wall thickness for the cylinder" END INPUT
Relations
All valid relations in a Pro/ENGINEER model can be entered in a Pro/PROGRAM. An example: d0 = d6 * 2 Here, d0 and d6 are dimension ID name.
IF-ELSE Clauses
Conditional statements, i.e. IF-ELSE, can be used to create a program branch. For example: ADD PROTRUSION..... IF d1 > d2 ADD HOLE ... END ADD ENDIF ADD CUT..... END ADD So, when d1 is smaller than d2, a CUT is added, instead of a HOLE.
ADD FEATURE (initial number 8) INTERNAL FEATURE ID 106 PARENTS = 100(#7) PROTRUSION: Extrude NO. ELEMENT NAME INFO --------------------------1 Feature Name Defined 2 Extrude Feat type Solid 3 Material Add 4 Section Defined 4.1 Reference Sketch F7(SKETCH_2) 5 Feature Form Solid 6 Direction Side 2 7 Depth Defined 7.1 Side One Defined 7.1.1 Side One Depth None 7.2 Side Two Defined 7.2.1 Side Two Depth Variable 7.2.2 Value 70.00 SECTION NAME = Sketch 2 FEATURE'S DIMENSIONS: d11 = 70.00 END ADD Additional operations can be added, and this ADD operation can be changed.
INTERACT
INTERACT statements provide a placeholder for creating interactive part. They can be inserted anywhere within the FEATURE ADD - END ADD. Here is an example, ADD PROTRUSION..... IF d1 > d2 ADD HOLE..... ELSE INTERACT END IF ADD CUT..... In this example, an alternate set of features will be created if d1 is not greater than d2. The ADD CUT command has to be input by the user.
MASSPROP
The MASSPROP statement is used to update mass properties each time geometry changes. Format is as follows: MASSPROP END MASSPROP
Editing Errors Common editing errors include: Having an IF statement without an END IF statement or vice versa Typing a variable name incorrectly in a relation or a condition Reordering a child before the parent Deleting a parent feature
The Pro/Program for this Part Model Start Pro/E Open the Part Model file: part5.prt Use Pull Down Menu Tool > Program
Program in AutoCAD
Widely Used and Easy to Implement Powerful Interactive Graphics Programming Tools AutoLISP ADS AutoCAD Development System (C) API Advanced Programming Interface (C++, High Level) Script Files (Micro) Menu Systems (Template) Extensive Tutorial Materials (@MECH410/520 web page)
Summary
Interactive Graphics Programming is traditionally carried out using graphics routines in a special package. Today all CAD systems offer different levels of Interactive Graphics Programming capabilities. This unique capability of CAD systems allows them to be further developed into most convenient and more productive design tools. Customization User interface improvement (menu, etc.) Repetitive and complex tasks Guidelines for design It is essential not to limit ones capability of using CAD system simply as a modeling program or drafting tool.