[Books]

Creo Elements/Direct 3D Library


Customizing 3D Library

This appendix describes briefly how to customize 3D Library to suit your particular needs. The more important aspects of customization are outlined here.


Note
This appendix is intended as a guide for Advanced Users.


In this appendix:

Overview

Note that 3D Library searches a number of locations for customization files upon start-up. For information about this, see the Integration Kit Function sd-get-customization-file. The first file found using that function is loaded as the customization file of 3D Library.

Have also a look to the default sl_customize file located in the Creo Elements/Direct Modeling's installation directory structure.

Customize Part Name

When creating parts of 3D Library and placing them into the model the used part name can be customized by a LISP function. This function gets a set of parameters to offer the user the possibility to generate a string which is later used as prefix for the part names of the 3D Library parts. The function is called when ever one of the different placing methods is used. Since there is the possibility to place more than one part at a time the string is used as a prefix and the part names are counted up using the normal mechanism of Creo Elements/Direct Modeling part name creation.

The function has to be defined as follows:

(defun lpo_vdaps::solidlib-get-name (args)
  (lisp commands returning a string)
  )

The used lisp-package lpo_vdaps and the function name to be used solidlib-get-name are fixed. A property list containing lots of parameters derived from the current selected and fully defined 3D Library Part is given to the function as args.

Parameters received:
:CLASS-NN {STRING}
The actual standard number got from the parameter files, see Syntax of Parameter Files (*.TAB), ID,NN.
:CLASS-NT {STRING}
The actual standard title got from the parameter files, see Syntax of Parameter Files (*.TAB), ID,NT.
:CLASS-NB {STRING}
The actual standard description got from the parameter files, see Syntax of Parameter Files (*.TAB), ID,NB.
:CLASS-NAME {STRING}
The actual standard class name as used internally by 3D Library. The class name or class code is visible in the Read Part function. It is the basename of the Parameter Files (*.TAB) without the ".TAB".
:CLASS-ID {STRING}
The actual standard class ID number as used internally by 3D Library. The ID number can be found in the Parameter Data Records, ID number.
:SDLIB-TYPE {KEYWORD}
The type of 3D Library part. Today this value is every time :VDAPS_PART, because this customize function is only used for real library parts.
:SDLIB-UNIQUE-ID {STRING}
The unique identifier as used internally by 3D Library. The unique identifier can be found in the Part List column "specification" in the table displayed.
:SDLIB-TABLE {LIST}
The complete contents of the Part Parameter Selection table in the User interface.
  • list of dimensions of lisp array
  • lisp array, containing the data of the selection table
Inside this data structure all visible parameters of the combination of the parameter files (*.TAB, *.ADD and *.EXT) are accessible. Remember that the contents of this table looks every time different when another standard is selected.
TIP: It is recommended to search in the 4th column for an identifier to be used, when the standard (:CLASS-NAME) matches.
Return Value:
The return value has to be a string that can be used as a part name prefix, see sd-gen-obj-basename :prefix.
Example:
(defun lpo_vdaps::solidlib-get-name (args)
  (format nil "LIB_~A_~A."
      (getf args :CLASS-NAME)
      (getf args :CLASS-NB)
      )
  )
Assume a slotted round nut of DIN 1804 with a nominal diameter of M35 is selected the example function is called with the parameters:
  (:CLASS-NN "DIN 1804"
   :CLASS-NT "Slotted round nut; metric ISO fine pitch thread"
   :CLASS-NB "Slotted_round_nut_M_35_x_1.5_DIN_1804_-_"
   :CLASS-NAME "D01804"
   :CLASS-ID "150"
   :SDLIB-TYPE :VDAPS_PART
   :SDLIB-UNIQUE-ID "1@D01804@150@@"
   :SDLIB-TABLE
       ((10 10)
        (("1" "=> 2"    "Type of thread"          "A01" "=" "M" 2 "" "SM" "T")
         ("2" "defined" "Thread diameter"         "A02" "=" " 35" 2 "mm" "SM" "Z")
         ("3" "=> 2"    "Pitch"                   "A03" "=" "1.50" 2 "mm" "SM" "Z")
         ("4" "=> 2"    "Nut height"              "B"   "=" "11" 2 "mm" "SM" "Z")
         ("5" "=> 2"    "External diameter"       "D"   "=" " 55" 2 "mm" "SM" "Z")
         ("6" "=> 2"    "Keyseat width"           "AAA" "=" " 7" 2 "mm""SM" "Z")
         ("7" "=> 2"    "Depth of keyseat"        "AAB" "=" "3.0" 2 "mm" "SM" "Z")
         ("8" "=> 2"    "Collar height"           "AAC" "=" "0.5" 2 "mm" "SM" "Z")
         ("9" "=> 2"    "Diameter of turned face" "AAD" "=" " 48" 2 "mm" "SM" "Z")
         ("10" "=> 2"   "Number of keyseats"      "AAP" "=" "4" 2 "" "SM" "Z")
        ))
    )
and returns in this case "LIB_D01804_Slotted_round_nut_M_35_x_1.5_DIN_1804_-_".

If the user defined function does not return a string, or a string not valid as a prefix for part name generation the Creo Elements/Direct 3D Library default is used again.

Setting up Design Data Management Link

To enable the Design Data Management online updates during start up of 3D Library, insert the following sequence into the customization file.

(when (oli::sd-license-free-module-active-p "PEWMSD")
    (SDAPS_SETUP_WMLNK :wm_on_off :on))

Setting up 3D DIN License

To enable the DIN Library 100 3D Parts during start up of 3D Library, insert the following sequence into the customization file. The result will then be the same as it have been in older versions of Creo Elements/Direct Modeling.
(SDAPS_SETUP_DIN_CLASSES :DIN_100 :ON)

[Books]