Using SmarTeam Scripts in a CATIA Session

You can already adapt SmarTeam to your particular requirements by writing and delivering scripts that modify or replace existing functions or even create new ones. Typical uses would be to check data produced or generate data (for a BOM or an export operation for example).
Such scripts can be:
  • attached to events in SmarTeam and be triggered before, after or instead of the action concerned
  • placed in the Graphic User Interface (GUI):
    • by default, in the Tools > User Defined Tools menu item
    • anywhere in the GUI by means of the Menu Editor.

You can also launch as many as ten SmarTeam scripts from a CATIA session using the ten associated commands. There are already six sample scripts delivered in the form of ready-to-run samples (see the List of Sample Scripts below). These scripts as well as any others you decide to write must be assigned to one of the ten associated commands. You then only have to place the corresponding commands where it suits you best in the GUI.

This task is made up of the following stages:

Defining the SmarTeam Scripts to be Accessed from the CATIA Session

  1. Run a CATIA session.

  2. Select Tools > Options....
    The Options dialog box appears with the category tree in the left-hand column.

  3. In the General category of the Options tree, select Compatibility.

  4. Click on the SmarTeam Scripts tab.


    Make sure you are connected to SmarTeam before accessing the Options dialog box.
    Otherwise, an error message will appear prompting you to do so.

  5. In the fields containing the command you want to use, open the combo box to display the list of scripts and select one of the scripts in the list to assign it to the command. In this way, you can associate one of ten scripts with each of the ten commands available:

  6. Click OK to confirm.

Placing the Commands in the CATIA Graphic User Interface

You must now decide where you want to put the SmarTeam commands in the CATIA GUI. You can, for example, create a SmarTeam toolbar containing the commands. To do this, do as follows:
  1. Select Tools > Customize... or View > Toolbars > Customize...
    The Customize dialog box appears.

  2. Select the Toolbars tab:

  3. Click on the New... button to create a new toolbar (see "Managing User-Defined Toolbars" in the CATIA - Infrastructure User's Guide).

  4. Click on the Commands tab and select the All Commands category on the left-hand side of the dialog box.

  5. From the Commands list, find the ten SmarTeam commands:

  6.  Drag and drop the command(s) onto the toolbar you just created.

For more information on toolbar customization, see "Customizing a Toolbar by Dragging and Dropping" in the CATIA - Infrastructure User's Guide.

List of Sample Scripts

    Provides information about the current database and current user.
    Retrieves attributes from a linked object (e.g. retrieves the part number of the documents displayed in the drawing sheets and updates the sheet profile card)
    Displays a bottom-up view of the selected object.
    Displays a stored view.
    Highlights the document in the CATIA session, assuming that the object selected in the SmarTeams window is open in the CATIA session.
    Presents a quick find interface.
    Inserts required information in a revision block in the drawing.
    Opens the SmartBox window.
    Initiates a new process and attaches the current item to it.