3D PLM PPR Hub Open Gateway |
File XPDM (PX1) |
Implementing Check-In command with specific icons in treeHow to use CATxPDMSessionUIServices |
Use Case |
AbstractThis article shows how to create an interactive command to save a complete session in a given directory. |
In this use case you will mainly earn how to use the ConnectToPX1
and
DisconnectFromPX1
methods of the CATxPDMSessionUIServices
class.
[Top]
CAAxPDMUICommands is a use case of the CAAxPDMInterfaces.edu framework that illustrates CATxPDMInterfaces framework capabilities. Be careful, such as all use cases illustrating the CATxPDMInterfaces framework, the current one requires a PX1 licence.
[Top]
The PX1 Toolbar containing several commands.
[Top]
To launch CAAxPDMUICommands, you will need to set up the build time environment, then compile CAAxPDMUICommands along with its prerequisites, set up the run time environment, and then execute the use case [1]. To launch it, refer to the What Does CAAxPDMUICommands Do section.
[Top]
The CAAxPDMUICommands use case is made of three files,
Windows | InstallRootDirectory\CAAxPDMInterfaces.edu\CAAxPDMToolbar.m\ |
Unix | InstallRootDirectory/CAAxPDMInterfaces.edu/CAAxPDMToolbar.m/ |
this file contains the addin to create the toolbar.
Windows | InstallRootDirectory\CAAxPDMInterfaces.edu\CAAxPDMUICommands.m\ |
Unix | InstallRootDirectory/CAAxPDMInterfaces.edu/CAAxPDMUICommands.m/ |
The first class is the state command launched when the end user push Connect To PX1 command. The second one defines Check-In and Check-Out commands (this is same command with a different argument)
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
Activation of PX1 icon mask
PX1 icon mask is activated through CATxPDMUIServicess::ConnectToPX1
APIs.
This API should be called after connection to your PDM (integrated in
connection command).
An automatic refresh of all icons already displayed is included in this call.
Complete sample of connection is delivered in CAAxPDMConnectCmd.cpp, you can
insert your own connection code in dedicated area (see comment in code).
Refreshing PX1 icon mask
There is no automatic update of PX1 icon mask in session (it will lead to
bad performances if CATIA check Read/Write status on disc for each icon
display). It means that this is responsability of CAA PDM Integration to update
them after each Check-In or Check-Out operation.
This refresh should be done through CATxPDMSessionServices::RefreshItemInformation
with CATxPDMSessionServices::ReadWrite
parameter.
This call is updating two information:
- Read/Write status of item in
memory. Without this update, you will never be able to Save item, even if you
have Read/Write access on disc.
- Mask of all icons
Complete sample of check-in delivered in CAAxPDMCheckInOutCmd.cpp, you can
insert your own connection code in dedicated area (see comment in code).
Remarks:
CATxPDMItem::NeedToBeSaved
allows checking this before Check-In.
CATIRedrawEvent::RedrawNodeVisu
[Top]
This sample show you :
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[Top] |
Version: 1 [Feb 2006] | Document created |
[Top] |
Copyright © 2006, Dassault Systèmes. All rights reserved.