login Register forgot password or username?
Search:         
Cradle from 3SL, the complete Model Based Systems Engineering Toolsuite, specialising in requirements management, requirements capture, model based systems engineering and for systems engineering software, support and consultancy, the logical choice: Cradle from 3SL.

December 2008 [Cradle 5.7]

How to Define Frames to Reference Images

To reference images from items in a Cradle database, you need:

  • To define an attribute (a frame) to reference the image
  • To load an image reference into this frame in a specific database item

To define a frame to reference an image held externally from Cradle (the first task), you must define a new data type (called a frame type) and define an image frame of this frame type (the second task). The steps to define the frame type are:

  1. Start WorkBench and login to your project as a user with PROJECT privilege
  2. Select Admin → Project Setup to display the Project Setup tool:
  3. Select Frame Types to define the current list of frame types, we must define a new frame type to reference images:
  4. Enter a name for the new frame type, such as GIF REF (the frame type will be dealing with GIF images in our example) and click Add, then ensure that the new frame type is selected and select Edit… to define its details in the Frame Type Details dialogue:
  5. Set the Base Type to be Image, the Image Type to be GIF, and the Storage Type to be As File since we want to reference the images from Cradle as external files:
  6. We can now define commands to operate on frames of this frame type. The only mandatory commands are the Edit: and View: commands. As we are referencing GIF images, we can use the standard Windows Paint program, the file:

    MSPAINT.EXE

    and we add it as both the Edit: and View: commands with $PATH (replaced at runtime by the pathname of the external image file) surrounded by quotes (in case the runtime pathname has any spaces in it, which it invariably will):
  7. Select OK to save the frame type definition and return to the Project Setup screen
  8. Now that we have defined the frame type (data type), we can define the new frame (attribute) to be of this frame type, so select the Item Types tab:
  9. Select the item type in which the frame is to be defined and select Frames… to display the Frame Setup dialogue:
  10. Enter a name for the new frame attribute, such as IMAGE REF, and click Add:
  11. Select the Type drop-down list to define the frame type for the new frame and choose the new GIF REF frame type that we have just defined:
  12. Click OK and then OK to leave Project Setup and click Yes in the Confirm Exit dialogue to confirm that the change should be written to the project schema

These steps have added a new frame called IMAGE REF (in this case) of type GIF REF (in this case) to the item type. This has not added any data to the database. It has created the opportunity for all items of the selected type to now have a GIF image stored in an external file referenced from their IMAGE REF frames in the database.