Customize CADMAX
Customize CADMAX
CADMAX offers a variety of ways you can integrate your products including translators, the Parasolid pipeline, and plug-in applications. Our development environment has many different levels your products can work with CADMAX, including full control over the screen workspace, macros, and two different APIs, CPF and ObjectMAX. Our development environment isn't just for third parties, our engineers program CADMAX in ObjectMAX. Below you will find brief descriptions of CADMAX's development environment.
Screen Workspace
CADMAX provides users a powerful environment that permits them to reconfigure the entire screen and then save the configurations as workspaces that can be recalled or moved to other workstations. CADMAX is shipped with a standard toolbar setup which most customers will find fit their daily needs. However, if you do want to make some changes, you'll find it very easy. Here's a look at some of the features that are available to customize CADMAX's workspace:
- Display multiple toolbars at once on the screen which can be docked or floating
- Create custom dialog boxes from macros
- Save configurations as a new Workspace that can be recalled at a later date
- Dynamically revise toolbars using drag and drop techniques
- Set default toolbars that are displayed
- Run CADMAX in Cool Look
- Rearrange the entire screen layout
- Design new icons and use them in any toolbar
- Define shortcut keys for all operations
- Change the default function on a toolbar
- Add new buttons and link them to macros, CPF, or ObjectMAX programs.
ObjectMAX
Since its inception, CADMAX has been an open environment supporting a variety of ways to maximize performance with the use of keyboard shortcuts, command macros, custom menus, and customer driven applications using popular programming languages such as Microsoft C. Starting with Version 8.5, CADMAX has exploded into the exciting world of Object Oriented Programming with a fresh new application development environment called ObjectMax.
Programmers who are comfortable with the world leading Microsoft Visual Studio development system will find ObjectMax a powerful way to create new CAD applications, making use of CADMAX as a server for all of the application's needs such as drawing data access, new command creation, existing command modification, user interface (GUI) development, transaction notifications, establishing custom entities, persistent data storage, and version independence. All of the C++ object oriented programming tools in Visual Studio may be used, such as Microsoft Foundation Class (MFC) user interfaces, and high performance visual debugging. In addition, by adding a single statement to the program, the many ObjectMax classes become available, each of which provides a reusable container for a specific capability or data type in CADMAX. Each ObjectMax application then becomes a separate Dynamic Link Library (DLL) which may be demand loaded or stay resident, and may consist of any number of commands or callbacks.
When using ObjectMax to access CAD data, instances of ObjectMax classes may be used to create new data (such as points, lines, curves, surfaces, solids, entire features, or even custom objects), or they may simply reference existing data in order to examine or copy their contents. Object hierarchy is used to define the natural CAD hierarchy (e.g. base_object -> line -> select_list). A suite of classes are provided for managing arrays of data objects. Numerous techniques are provided for easily creating arrays of objects from other objects (e.g. all objects in a group). Most importantly, each CAD data atom has a unique numeric handle which will forever identify it, making access to known data from an application easy (e.g. erase a temporary construction object created by the program). Naturally, ObjectMax has complete access to all system settings, modifiers and other preferences.
Even more helpful, ObjectMax provides a comprehensive ability to receive notification whenever important events occur. Any good CAD application must always be ready to examine each operator action for its potential impact. ObjectMax, using standard C++ virtual entry points, allows for program control in virtually all situations. Such notifications include data transform/copy/erase, drawing open/save/close, command dispatch/abort/repeat, system messages/errors, undo/redo, and so forth. During most notifications, the application is given a chance to approve or even modify the transaction, and the application may monitor any transaction in order to update its own local data storage.
ObjectMax is not simply a utility provided for custom programming. The developers of CADMAX have been using ObjectMax for several years for all application programming. In fact, both the entire CADMAX User Interface and CADMAX Solid Master Feature based modeling are written strictly using the ObjectMax interface. For this reason, ObjectMax has become a sophisticated, extensive and reliable programming interface, able to support simple custom programming as well as to tackle the needs of large applications.
Macros
Macros are used to batch multiple commands together in CADMAX. When drafting with the CADMAX software, each operator action is converted into one or more codes which CADMAX can understand and manipulate. These same codes can be assembled by the operator into a macro file in order to perform multiple tasks with a single command.
Macro codes are contained in the CADMAX Macro Dictionary which is available through Help. The codes, listed in alphabetical order according to their related CADMAX commands, correspond to CADMAX functions and modifiers. Each is unique for its specified purpose.
Using the codes listed in the Macro Dictionary, macros can be created easily to specify step-by-step CADMAX operations. These files can be stored and retrieved when necessary. CADMAX reads a retrieved file and performs each specified operation in the file as though it had been entered by the operator. Places can be specified in a macro in which the system stops to wait for an operator input; this enables files to be customized even further.
CPF
In a nutshell, the CADMAX Programming Facility (CPF) provides within CADMAX an interface to a high level programming language. Both Microsoft and Borland languages are supported with the C or C++ language being the preferred language interface. Pascal is also supported as a subset of Borland Delphi. CPF is a non-object oriented way to program CADMAX using a high level programming language.
CPF allows a software developer to create new functions for the CADMAX system, by writing programs in a programming language which interacts with the standard CADMAX functions and modifiers. These programs execute inside CADMAX and interact with CADMAX through the use of a library of procedures and functions which communicate with CADMAX through a device driver mailbox mechanism. CPF programs may create, edit, select and query existing drawing objects, maintain databases, perform calculations and prompt the user for information to complete a job.
Some experience in computer programming is required to use CPF, although, as examples show, if you already are familiar with CADMAX software and CADMAX macros, it is not a big step to writing programs to further enhance your customization of the system. In the simplest case, CPF can be viewed merely as a way of writing macros which have a little more capability, such as saving a value in a variable, skipping some commands under certain circumstances (called "branching"), and performing computations.



