Creating a NLS User Feature    

The scenario below describes how to create a NLS User Feature. The following features can now be displayed in your language at instantiation:
  • The input role
  • The parameters (names and string multiple values)
  • The output role after the instantiation
  • The update error message
In the scenario below, the input role and the parameters are NLS.
  1. From the Tools>Options>General menu, click Parameters and Measure, and select the Knowledge Environment tab. Click the  button and select the directory that will contain the types file (.CATGScript file). Click OK when done.

  2. Open the PktcreateaUDF.CATPart file. Note that this file already contains a User Feature located below the KnowledgeTemplates node.

  3. From the Start>Knowledgeware menu, access the Product Knowledge Template workbench.

  4. Click the Create a UserFeature icon (). The UserFeature Definition dialog box is displayed. Replace the default User Feature name with NLSUDF, then click the Assemble.2 object in the specification tree. The dialog box now looks like the one below:

  1. Click the Inputs tab and assign a role to each input:

    • Click Point.2 in the User Feature Definition window, and enter First_input in the Name field.
    • Click Point.3 in the User Feature Definition window, and enter Second_input in the Name field.
    • Click Extract.1 in the User Feature Definition window, and enter Third_input in the Name field.
    Note that the role you assign in this tab is the one that will be used to create the .CATNls file (step 9.)
  2. Click the Parameters tab and select the `Body.2\OpenBody.1\Circle.2\Circle center radius.1\Radius` parameter. Click Published Name and assign it a name: Cylinder_Radius.

  3. Assign a type to the User Feature.

    • Click the Type tab.

    • In the Super Type field, click Auto.
    • In the Type1 field, enter the name of the type that you want to create and click Generate. The type is created as well as the associated .CATGScript file which is saved in the directory you previously selected (Step 1.)
    • Click Save and Close when done.
    • Click OK to exit the User Feature definition window.
  4. Save your file and quit CATIA.

  5. Open a Text Editor and enter the following text to create the .CATNls file:

    First_input ="Select 1st Point";
    Second_input ="Select 2nd Point";
    Third_input
    ="Select the surface";
    Cylinder_Radius="Radius of the UDF";
    Note that Point.2, Point.3, and Extract.1 are the inputs of the User Feature.
    Japanese users must use Japanese characters in this file.
  6. Save your file under the following name: CATTypeCATWheel.CATNls in the resources\msgcatalog directory. Close the Text Editor.

  7. Open CATIA and open the PktForInstantiation.CATPart file.

  8. In the PKT workbench, click the Instantiate From Document icon (). The File Selection window is displayed. Select the PktcreateaUDF.CATPart file that you have saved and click Open. The following image is displayed:

  1. Select the first point, the second point, and the surface: The User Feature is instantiated.

For more information about the User Feature definition window, see Introducing the User Feature Definition window. See the Quick Reference topic for a comprehensive list of the interactions that can be carried out on User Features.