Inserting iBox components |
Top | Previous | |
▪ | C:\W4INV <Inventor Version> Design\PROJECTS\Samples\API Samples\iBox Insert\Cupboard.iam |
Cupboard.iam example demonstrates a possible practical application of the Woodwork for Inventor API using the iBox insertion function.
In the example, the user can control various configuration parameters of the cupboard by running the "Cupboard configuration" iLogic form.
In this form the user can control:
▪ | Cupboard dimensions. |
▪ | Add/remove drawers to/from the cupboard. |
▪ | Change the drawer height. |
▪ | Change the drawer type. |
The Woodwork for Inventor API function which corresponds to the iBox Insert function is used to insert the drawer into the cupboard structure. The cupboard model is constructed in such a way that it carries a Skeleton part, where the entire geometry of the cupboard parts is created. You can read more about skeleton design in the section “Skeleton dressup”. The overall geometry of the cabinet is controlled by this skeleton.
One of the Solid Bodies of the carcass, called the "Cupboard Drawer Skeleton", is used to control the dimensions of the drawer. Its Faces are given names in Autodesk Inventor. In the example under consideration, these are Front, Top, Right and Left faces. The iLogic rule “Configuration Control”, which inserts the drawer and binds it to this solid body, uses these names to find the right faces and bind them to the corresponding iMate constructs of the drawer. Every iBox component must have these iMates. In the drawer iBox examples, these are: Front of drawer Box, Top of drawer Box, Right of drawer Box. When changing the dimensions of the cupboard via the iLogic form, the Refresh function is applied in the iLogic rule, which automatically recalculates the dimensions of the drawer according to the change of the Cupboard Drawer Skeleton.
This example is just one of the possible scenarios for the management of an iBox component when creating a configurable piece of furniture. Its purpose is to demonstrate the basic capabilities of iBox insertion with the help of API. However, this scenario can be extended. For example, once an iBox drawer of one type has been copied during insertion, it can be used in other configurations without the need to make a new copy of it.