Inspection Process Definition |
Inspection |
Accessing TolerancesAccessing tolerance related information |
Use Case |
AbstractThis article discusses the CAADNBInsTolCmd use case. This use case explains how to access the TTRSList and get the component list. |
This use case is intended to help you get the details regarding accessing the tolerance related parameters.You can also know more about tolerance information like extracting tolerance values in the Tolerance modeler where further details would be given.
[Top]
CAADNBInsTolCmd is a use case of the CAADNBInsTolerance.m module in the CAADNBInspectInterfaces.edu framework that illustrates CAADNBInspectInterfaces framework capabilities.
[Top]
The use case allows the user to get the TTRSList and to get the component list .
[Top]
To launch CAADNBInsTolCmd, you will need to set up the build time environment, then compile CAADNBInsTolCmd along with its prerequisites, set up the run time environment [1], open the Process document, load the Geometry, define a feature associated to the geometry and then execute the command.
[Top]
The CAADNBInsTolCmd use case is located in the CAADNBInsTolerance.m module of the CAADNBInspectInterfaces.edu framework:
Windows | InstallRootDirectory\CAADNBInspectInterfaces.edu\CAADNBInsTolerance.m\ |
Unix | InstallRootDirectory/CAADNBInspectInterfaces.edu/CAADNBInsTolerance.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
Following are the logical steps in CAADNBInsTolCmd:
We will now comment each of these sections by looking at the code.
[Top]
The use case is executed after a Geometry is loaded and a feature is defined which is associated to the geometry. It allows the user to get the TTRSList and the component list .
[Top]
//============================================================================= // PickFeature : When the Feature is picked this method is called and // this method gets TTRSList , then the ComponentList //============================================================================= CATBoolean CAADNBInsTolCmd::PickFeature( void *data ) { HRESULT rc=E_FAIL; CATBaseUnknown *cbu=NULL; cbu = _ProcessAgent->GetElementValue(); if( NULL == cbu ) return(FALSE); // Get a Handler to the DNBIInsFtrPosition Interface DNBIInsFtrPosition *fp=NULL; rc=cbu->QueryInterface(IID_DNBIInsFtrPosition,(void **)&fp); cbu->Release(); cbu=NULL; if(FAILED(rc)||NULL==fp) return(FALSE); // Get the List of TTRS CATListValCATBaseUnknown_var ListOfTTRS; rc = fp->GetTTRSList(ListOfTTRS); // realease the Handler fp->Release(); fp=NULL; if( ListOfTTRS.Size() == 1 ) { // Get the First Element from the TTRS list CATITTRS_var pTTRS( ListOfTTRS[1] ); if( NULL_var == pTTRS ) return(FALSE); // Get the component list CATLISTV(CATBaseUnknown_var) ComponentList; rc = pTTRS -> GetComponents (ComponentList); } return TRUE; } |
When the feature is picked this method retrieves the TTRS list and the component list.
[Top]
The use case finishes retrieving the TTRS List and the Component list.
[Top]
This use case has demonstrated the way to get the TTRS list and the component list for a feature related to a geometry.
The use case :
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[Top] |
[Top]
History | |
Version: 1 [Mar 2002] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.