creo toolkit introduction
TRANSCRIPT
CREO-TOOLKIT ( PRO-TOOLKIT)INTRODUCTION
Sandip Jadhav
Harshil Oza
TOPICS
Modes
Models
Model Items
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODES
Mode in Pro/Toolkit means the type of model currently being edited by the user
The possible modes are the options under the Pro/ENGINEER command File > New
ProMode enumerated data type, declared in ProMode.h
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODES API
ProModeCurrentGet()
ProSectionIsActive()
outputs the mode in which Pro/ENGINEER is being used (example: PRO_MODE_PART, PRO_MODE_SKETCH etc)
If there is no current model than API retunes error PRO_TK_BAD_CONTEXT
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODES API
ProModeCurrentGet() outputs the mode in which Pro/ENGINEER is being used (example: PRO_MODE_PART, PRO_MODE_SKETCH etc)
If there is no current model than API retunes error PRO_TK_BAD_CONTEXT
ProSectionIsActive()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODES API
ProModeCurrentGet()
ProSectionIsActive()
checks if the sketcher is currently active even if the current mode is part or assembly
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS
A model is a top-level object in a Pro/ENGINEER mode. For example, in Part mode, the model is a part; in Assembly mode, the model is an assembly
The declaration of ProMdl is as follows: Typedef void* ProMdl;
ProSolid is an instance of ProMdl, and ProAssembly and ProPart are instances of ProSolid
All these object types are represented in Pro/TOOLKIT by opaque handles
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS
This section describes Pro/TOOLKIT models. The topics are as followsCreating Models
Identifying Models
Models in Session
File Management Operations
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
CREATE MODELS API
ProSolidCreate()
ProMfgCreate()
ProSection2DAlloc()
ProDrawingFromTmpltCreate()
ProMdlStartAction()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
CREATE MODELS API
ProSolidCreat() Creates a new Pro/ENGINEER object of the specified type (Part or Assembly)
ProMfgCreate() Creates new manufacturing models
ProSection2DAlloc() Allocates a two-dimensional section
ProDrawingFromTmpltCreate() Creating Drawings from Templates
ProMdlStartAction()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet()
ProMdlTypeGet()ProMdlInit()
ProMdlIdGet()
ProMdlDataGet()
ProMdlSubtypeGet()
ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()Providethe name and type of a model, given its ProMdl handle. Type is enumerated data type ProType
ProMdlInit()
ProMdlIdGet()
ProMdlDataGet()
ProMdlSubtypeGet()
ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()ProMdlInit()
Provides a valid ProMdl handle for a given name and type
ProMdlIdGet()
ProMdlDataGet()
ProMdlSubtypeGet()
ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()ProMdlInit()
ProMdlIdGet() Provides integer id to a model. It’s one of the way to identify the model(ex. Surface ,edge etc), the identifier of a model is not
persistent between Pro/ENGINEER sessions
ProMdlDataGet()
ProMdlSubtypeGet()
ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()ProMdlInit()ProMdlIdGet()ProMdlDataGet()
provides a C structure that contains information about the name and location of the operating system file in which the model is saved
ProMdlSubtypeGet()ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()ProMdlInit()ProMdlIdGet()ProMdlDataGet()ProMdlSubtypeGet()
provides the subtype (such as sheet metal) of a specified model. Valid model subtypes are Part, Assembly, or Manufacturing. This is like finding subtypes at the Pro/ENGINEER File > New > Model Type menu
ProMdlToModelitem()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
IDENTIFYING MODELS API
ProMdlNameGet() &ProMdlTypeGet()ProMdlInit()
ProMdlIdGet()
ProMdlDataGet()
ProMdlSubtypeGet()
ProMdlToModelitem()
the first step in building a ProSelection object that describes the role of a model in a parent assembly
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
ProSessionMdlList()
ProMdlCurrentGet()
ProMdlDependenciesList()
ProMdlDeclaredList()
ProMdlModificationVerify()
ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
ProSessionMdlList()
provides an array of ProMdl handles to models of a specified type currently in memory
ProMdlCurrentGet()
ProMdlDependenciesList()
ProMdlDeclaredList()
ProMdlModificationVerify()
ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
Models in Session API
ProSessionMdlList()
ProMdlCurrentGet()
provides the ProMdl handle to the model currently being edited by the user.
ProMdlDependenciesList()
ProMdlDeclaredList()
ProMdlModificationVerify()
ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
Models in Session API
ProSessionMdlList() ProMdlCurrentGet() ProMdlDependenciesList()provides an array of ProMdl handles to the models in memory upon which a specified model depends. One model depends on another if its contents reference that model in some way
ProMdlDeclaredList() ProMdlModificationVerify() ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
Models in Session API
ProSessionMdlList()
ProMdlCurrentGet()
ProMdlDependenciesList()
ProMdlDeclaredList()
provides an array of ProMdlhandles to layout models that have been declared to a specified solid model
ProMdlModificationVerify()
ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
Models in Session API
ProSessionMdlList()
ProMdlCurrentGet()
ProMdlDependenciesList()
ProMdlDeclaredList()
ProMdlModificationVerify()
tells you whether a specified model in memory has been modified since it was last saved or retrieved
ProMdlIsModifiable()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODELS IN SESSION API
Models in Session API
ProSessionMdlList()
ProMdlCurrentGet()
ProMdlDependenciesList()
ProMdlDeclaredList()
ProMdlModificationVerify()
ProMdlIsModifiable()
checks if the specified model is modifiable
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()
ProMdlfileCopy()
ProMdlRename()
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
ProMdlRetrieve() retrieves the model into memory, but does not display it or make it the current model
ProMdlSave()
ProMdlCopy()
ProMdlRename()
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()equivalent to the Save As command in the File pull-down menu of the Pro/ENGINEER menu bar
ProMdlCopy()
ProMdlRename()
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()equivalent to the Save As command in the File pull-down menu of the Pro/ENGINEER menu bar
ProMdlRename()
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()
ProMdlRename()equivalent to the Save As command in the File pull-down menu of the Pro/ENGINEER menu bar
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()
ProMdlRename()equivalent to the Rename command in the File pull-down menu of the Pro/ENGINEER menu bar
ProMdlBackup()
ProMdlDelete()
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()
ProMdlRename()
ProMdlBackup()
ProMdlDelete() Makes a backup of an object in memory to a disk in a specified directory. This function is equivalent to the
Pro/ENGINEER command File, Backup
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
FILE MANAGEMENT OPERATION
File Management Operation
ProMdlRetrieve()
ProMdlSave()
ProMdlCopy()
ProMdlRename()
ProMdlBackup()
ProMdlDelete() Deletes the specified model from memory and disk
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
MODEL ITEMS
The object type ProModelitem is a Data handle
contains the item type, the persistent integer identifier of the item, and the handle to the owning object
C structure typedef struct pro_model_item
{
ProType type;
int id;
ProMdl owner;
} ProModelitem
CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
THANK YOU
https://twitter.com/sandipnjadhav
https://in.linkedin.com/in/sandipjadhav
Visit Us @ www.cctech.co.in
Call Us @ +91 20 4009 8381/82
Centre for Computational Technologies Pvt. Ltd.
Development Centre
1, Akshay Residancy, 50 Anand Park,Aundh, Pune -7CENTRE FOR COMPUTATIONAL TECHNOLOGIES - (CCTECH) WWW.CCTECH.CO.IN
Join us at www.simulationHub.com