Debugging a User Feature        

This task shows how to use the debugging capabilities added to the User Features.
Open the PktcreatedUDF.CATPart file. Note that this file already contains a User Feature located below the KnowledgeTemplates node.
  • The debugging capability is available only if you have the PKT license. If you do not have the PKT license, a White box User Feature or a Back box User Feature are seen as Black Box protected ones. Note that this command is available in the PKT workbench only.
  • This functionality is designed to show only internals so there is no external view specific to the debug. Any other action than the ones listed below is not supported and not supposed to work:
    • You can display the list of components of the User Feature instance
    • You can see if any component has an Update Error mask or a Deactivated mask.
    • You can see the parameters of each component.
    • You can double-click on one of these components in order to edit it. BUT it is forbidden to modify it.

Create and Instantiate a User Feature Using the White Box Mode

The White Box mode enables you to visualize what is inside the User Feature instance when the instantiation is not what you expected.  The internals of the User Feature are visible in the tree but they are considered as private elements. It is important that you:
  • Do not try to modify the internals (after instantiation) by double-clicking them, using the Formula editor.... Error messages are designed to help you understand the error update.
  • Do not use the internals (to construct geometry for example).
  1. Expand the KnowledgeTemplates node and double-click Pad2 to open the Userfeature Definition dialog box.

  2. Click the Properties tab and select White Box in the Mode combo box.

  3. Click OK when done.

  4. Save your file but do not close it.

  5. Open the PktForInstantiation.CATPart file.

  6. Click the Instantiate From Selection icon () and from the Window menu, access the PktcreateaUDF.CATPart file. A dialog box is displayed:

  7. Click OK. Click Point.2, Point.3 and Draft.1 in the geometry and click OK. The User Feature is instantiated. Expand the User Feature (Pad2.1) node in the specification tree. The User Feature internals are displayed. Close PktForInstantiation.CATPart without saving it.

Create and Instantiate a User Feature Using the Black Box Mode

The Black Box mode is the standard mode. It simplifies the user view, and limits the exposition of the User Feature internals.
  1. In the PKtcreatedUDF.CATPart file, expand the KnowledgeTemplates node and double-click Pad2 to open the Userfeature Definition dialog box.

  2. Click the Properties tab and select Black Box in the Mode combo box.

  3. Click OK when done. Save your file but do not close it.

  4. Open the PktForInstantiation.CATPart file.

  5. Click the Instantiate From Selection icon ()  and from the Window menu, access the PktcreatedUDF.CATPart file.

  6. Click Point.2, Point.3 and Draft.1 in the geometry and click OK. The User Feature is instantiated.

  7. Click the instantiated User Feature (Pad2.1) in the specification tree and click the UDF Debug icon (). A warning message is displayed:

  8.  Click OK. The Pad2.1 node expands and the User Feature internals are displayed.

Create and Instantiate a User Feature Using the Black Box Protected Mode

The Black Box Protected mode ensures a locked view of the User Features thus ensuring secure exchanges.
  1. In the PKtcreatedUDF.CATPart file, expand the KnowledgeTemplates node and double-click Pad2 to open the Userfeature Definition dialog box.

  2. Click the Properties tab and select Black Box Protected in the Mode combo box. A dialog box is displayed informing you that after clicking Yes, you will not be able to access the User Feature internals. click Yes.

  3. Click OK when done. Save your file but do not close it.

  4. Open the PktForInstantiation.CATPart file.

  5. Click the Instantiate From Selection icon ()  and from the Window menu, access the PktcreateaUDF.CATPart file.

  6. Click Point.2, Point.3 and Draft.1 in the geometry and click OK. The User Feature is instantiated.

  7. Click the instantiated User Feature (Pad2.1) in the specification tree and click the UDF Debug icon (). A dialog box is displayed informing you that you cannot display the internals of the User Feature.

See also: Using the Parent/Children Debug Command.

If you want to protect your data and ensure IP protection, it is recommended to create the User Feature in White Box or Black Box and to delete the items making up the User Feature.