Extended modules > Mold Design > Create plastic features > Register a user-defined plastic feature
  
Register a user-defined plastic feature
When you create a user-defined plastic feature, Creo Elements/Direct Modeling loads a tool part and pastes the faces of the part to the mold part. The loaded tool part can be either a face part or a solid part. For solid parts, you are asked to specify the open faces on the part that are used in the paste operation.
A customized plastic feature must first be registered in a customization file found in the Creo Elements/Direct Modeling installation directory:
.../personality/sd_customize_x/MoldDesignAdvisor/md_customize
where x is your Creo Elements/Direct Modeling version number.
Before you can create user-defined features, you must register the plastic feature. If the tool part is to be loaded through a function, it must first be defined (in LISP). Then you use the following function for registration:
register-load-plastic-feature ( "name"
:categories "string"
:load-tool-func "file"
:dialog-image "file"
:browser-image "file"
:package-file "file"
:description "text"
:tools-file "files" )

The input parameters are as follows:
name: a string that specifies the name of the feature being defined.
:categories: a string or a list of strings that specify in which category the feature should be shown in the Plastic Feature browser.
:package-file: the package file of the tool part, if the tool part is saved in a package file in the customization directory
sd_customize_x/MoldDesignAdvisor/user_geometry.
:load-tool-func: the name of the function that loads the tool part for pasting, if :package-file is NOT specified. NIL should be returned when errors occur.
:dialog-image (optional): the filename of an image (size: about 160x160) of the tool part, that is shown in the feature dialog. The file must be stored in the customization directory
sd_customize_x/MoldDesignAdvisor/user_geometry.
:browser-image (optional): the filename of an image (size: about 50x50) of the tool part, that is shown in the Plastic Feature browser. Again, it must be stored in the customization directory
sd_customize_x/MoldDesignAdvisor/user_geometry.
:description (optional): text that contains other information (such as factory-specific data). This is available when modifying plastic features, and the information is also included in plastic feature reports.
:tools-file (optional): the name of a file containing tools associated with the feature; for example, slider geometry or slider-subtracting geometry. This is available when modifying plastic features, and the information is also included in plastic feature reports.
Examples
1. The following function registers a user-defined geometric feature whose tool part is a solid part. The tool part is loaded by specifying the package file:
(register-load-plastic-feature "Boss_Solid-Part"
:categories "Demo Parts"
:package-file "ugeo_solid_boss.pkg"
:description "factory specific data"
:tools-file "ugeo_solid_boss_tools.pkg"
:dialog-image "ugeo_solid_boss.xpm"
:browser-image "ugeo_solid_part_brs.xbm"
)

2. This function registers a user-defined geometric feature whose tool part is a face part. The tool part is loaded by invoking a function:
(defun load-user-defined-solid-boss()
(let ((res (sd-get-customization-file "ugeo_solid_boss_fp.pkg"
:subdirectory "MoldDesignAdvisor/user_geometry/"
:level-prefix nil
:first-found t)))
(if res
(sd-call-cmds (load_package res))
nil)
))
(register-load-plastic-feature "Boss_Face-Part"
:categories "Demo Parts"
:load-tool-func "mold-ui::load-user-defined-solid-boss"
:dialog-image "ugeo_solid_boss_fp.xpm"
:browser-image "ugeo_face_part_brs.xbm"
)