3D PLM PPR Hub Open Gateway

File XPDM (PX1)

Implementing Check-In command with specific icons in tree

How to use CATxPDMSessionUIServices

Use Case

Abstract

This article shows how to create an interactive command to save a complete session in a given directory.


What You Will Learn With This Use Case

In this use case you will mainly earn how to use the ConnectToPX1 and DisconnectFromPX1 methods of the CATxPDMSessionUIServices class.

[Top]

The CAAxPDMUICommands Use Case

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]

What Does CAAxPDMUICommands Do

The PX1 Toolbar containing several commands.

[Top]

How to Launch CAAxPDMUICommands

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]

Where to Find the CAAxPDMUICommands Code

The CAAxPDMUICommands use case is made of three files,

this file contains the addin to create the toolbar.

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]

Step-by-Step

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:

 

[Top]


In Short

This sample show you :

[Top]


References

[1] Building and Launching a CAA V5 Use Case
[Top]

History

Version: 1 [Feb 2006] Document created
[Top]

Copyright © 2006, Dassault Systèmes. All rights reserved.