Associating an Image with an Action

When creating an action, you can associate an image with this action. This image appears in the Parameters dialog box at instantiation.

Notes:
  • The following image formats are supported: RGB, PICTURE, JPEG, BMP, and PNG.
  • If you work with a Data Setup table:
    1. Fill in the Resources set name box that corresponds to the resource table internal name.
    2. Fill in the Directory logical name box that is the logical name of the resource container.
    3. Enter the image name along with its extension.
  • If you work with a resource table:
    1. Fill in the Directory logical name box corresponds to the logical name.
    2. Enter the image name along with its extension.

This task shows you how to:

Create a Resource Folder and Save an Image

You must save the image you want to be displayed in the instantiation window in a resource container before associating it with the template.

  1. Select Add > Content > Know-how Apps Resources .
  2. Click Import a Directory and click the node in the tree.
    The Folder Chooser dialog box opens.
  3. Navigate to the directory containing your image and click OK.
    The folder is displayed below the name of the resource container in the tree as well as the image it contains.
  4. Click Share > Save > Save with Options.
    The image is saved in the Zip file.

Create a Resource Table

After creating the zip folder, you must create a resource table and save the new zip in this table.

  1. From the Compass, click 3D Modeling Apps and select Engineering Rules Capture.
  2. Click Resource table .
  3. In the Resource table management window, click Add a new resource item.
  4. Give a logical name to the new resource item and select Directory from the Resource Type list.
  5. Double-click the Resource box.
    The Select a Directory for item xxx appears.
  6. Click the From Search tab, enter the zip name, and click Search.
    The zip file is displayed in the list.
  7. Double-click the zip and click OK.

Associate the Image with the Action

You are going to associate the image with the action.

Before you begin: You must have created the action.
  1. Right-click the action and select Properties.
  2. Fill in the boxes of the Image frame.
    1. Enter the directory logical name.
    2. Enter the image name.
    3. Click Check Image to make sure the image can be found and click OK.
  3. Keep your document open and save.

Run the Action

You can now run the action and check that the image is associated.

Note: If no image can be found when running the action, the action body is shown.

  1. From the Compass, click 3D Modeling Apps and select 3D Templates Capture.
  2. Right-click the action in the tree and select Action.xxx object > Run.
    The Insert object dialog box appears showing the associated image.
    Note: To run an action, select the action in the tree and click.