UI Customization Support
- Concepts
-
- Available Commands
-
sd-load-additional-available-commands-file
sd-load-all-additional-available-command-files
sd-enable-application-commands
sd-disable-application-commands
sd-define-available-command
sd-delete-available-command
sd-inq-available-command-data
- Toolbars
-
sd-load-toolbar
sd-load-all-toolbars
sd-show-toolbar
sd-hide-toolbar
sd-toolbar-visible-p
sd-assign-toolbar-group
sd-remove-toolbar
sd-remove-all-toolbars
sd-set-toolbar-button
sd-reset-toolbar-button
sd-get-toolbar-combobox-selected-item
sd-set-toolbar-combobox-selected-item
- Directories and Files
- sd-load-customization-file
sd-get-customization-file
sd-get-app-specific-customization-file
sd-inq-app-specific-user-customization-dir
sd-inq-app-specific-user-customization-file
sd-get-app-customization-subdirectory
sd-get-app-customization-file-prefix
sd-get-app-external-name
sd-add-application-data
sd-inq-application-data-p
Concepts
To learn more about Available Commands and Toolbar
customization, please read the Customization
Guide for Administrators and Advanced Users.
The functions described on this page enable you to enhance your add-on
application with customization capabilities which the Creo Elements/Direct
Modeling user can use in his personal toolbars.
Simple add-on applications which augment the functionality of Creo
Elements/Direct Modeling. When the user switches to this add-on application,
all core Creo Elements/Direct Modeling functionality will be accessible
well.
The following steps are necessary to enable an add-on application for
user customization:
On activation of your add-on application "My-App":
;; load all "My-App" specific available commands:
(sd-load-all-additional-available-command-files "My-App/myapp_avail_cmds.cmd")
;; enable these commands:
(sd-enable-application-commands "My-App")
;; load and enable toolbars:
(sd-load-all-toolbars "My-App")
On deactivation of your add-on application "My-App":
;; disable all "My-App" specific available commands:
(sd-disable-application-commands "My-App")
- Note:
-
If your add-on application creates an application specific graphical browser,
you should add the following lines to the
:activateAction and :cleanupAction of your application
button:
:activateAction '(progn
;; ...
(sd-show-graphical-browser "My-App-Browser" :tabOnly t)
;; ...
)
:cleanupAction '(progn
;; ...
(sd-hide-grahpical-browser "My-App-Browser" :inclTab t)
;; ...
)
SD-LOAD-ADDITIONAL-AVAILABLE-COMMANDS-FILE [function]
(sd-load-additional-available-commands-file filename)
- Description:
-
Loads the additional available commands specified in
filename into Creo Elements/Direct Modeling to allow the user to
use these commands in popup menus and toolbars.
If a command with the same triple
Application-Group-CommandName existed in Creo
Elements/Direct Modeling already, this command gets redefined with the
parameters defined in this available commands file.
- Parameters:
-
- filename {STRING}
- Full path to a file which contains the specification of additonal
available commands.
See Creo Elements/Direct Modeling's default file under
personality/sd_customize for a full description of the
required contents syntax.
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-load-additional-available-commands-file "C:/Program Files/PTC/Creo Elements/Direct Modeling 20.7.1.0/add-on-app/sd_customize/var_app_cmds.cmd")
SD-LOAD-ALL-ADDITIONAL-AVAILABLE-COMMAND-FILES [function]
(sd-load-all-additional-available-command-files relative-file)
- Description:
-
This function loads all available commands from files with name
relative-file searched in
User/Site/Corp/SD customization directories.
Commands with the same triple
Application-Group-CommandName overwrite each other.
The precedence is
- User
- Site (if set)
- Corp (if set, if not set: Creo Elements/Direct Modeling's default
directory)
That means a User command will overwrite/redefine the same
Site/Corp/SD command and so on.
- Parameters:
-
- relative-file {STRING}
- Name of the available commands file to be searched and loaded.
This string may also contain directory names which refer to
subdirectories in the specific User/Site/Corp customization
directories.
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-load-all-additional-available-command-files "ANNOTATION/avail_cmds.cmd")
tries to load the following files in the following order:
1. $SDINSTALLDIR/personality/sd_customize/ANNOTATION/avail_cmds.cmd
2. $SDCORPCUSTOMIZEDIR/ANNOTATION/avail_cmds.cmd (if set)
3. $SDSITECUSTOMIZEDIR/ANNOTATION/avail_cmds.cmd (if set)
4a. $SDUSERCUSTOMIZEDIR/ANNOTATION/avail_cmds.cmd (if set) or
4b. $USER_PROFILE_DIR/PTC/Creo Elements Direct Modeling 20.7.1.0/20.7/ANNOTATION/avail_cmds.cmd
SD-ENABLE-APPLICATION-COMMANDS [function]
(sd-enable-application-commands application :exclusive exclusive-flag)
- Description:
-
Enables all available commands defined for the application with
name application. If the exclusive flag is given, only
available commands belonging to application and to the
application "All" will be accessible.
- Parameters:
-
- application {STRING} - Name of application who's command
should be enabled
- :exclusive {BOOLEAN [nil]}
- Flag to indicate whether the application commands should be the
only activated commands (including commands belonging to
"All") or not.
- Return Value:
-
- t - success
- nil - failure
- Examples:
-
(sd-enable-application-commands "SheetAdvisor")
(sd-enable-application-commands "Annotation" :exclusive t)
SD-DISABLE-APPLICATION-COMMANDS [function]
(sd-disable-application-commands application)
- Description:
-
Disables available commands belonging to the application with
name application. Toolbar and popup menu buttons which reference
commands of this application will become insensitive (greyed out)
automatically.
The list of commands in the Customize menu will only contain
commands to be used on e.g. toolbars which are enabled.
- Parameters:
-
- application {STRING} - Name of application who's commands
should be disabled
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-disable-application-commands "Annotation")
SD-DEFINE-AVAILABLE-COMMAND [function]
(sd-define-available-command application group command
:groupTitle group-title
:commandTitle command-title
:action command-action
:description description
:image image
:ui-behavior ui-behavior
:accelerator accelerator
:enable enable-form
:context-enable context-enable-form)
:update-unknown-commands update-unknown-commands)
- Description:
-
Defines a new available command.
Note: You can't redefine an existing available command with the
same identification application-group-command. You
can only define a new command with this function.
For more information on parameters and examples, see
personality/sd_customize/sd_avail_cmds.cmd.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- :groupTitle {STRING} - optional localized group title
- :commandTitle {STRING} - optional localized command
title
- :action {STRING or LISP-form} - the command action
- :description {STRING} - optional command description
- :image {STRING} - relative path to optional toolbar
image
- :ui-behavior {KEYWORD} - :default,
:relative or :none
- :accelerator {STRING} - optional accelerator key
definition
- :enable {LISP-form} - determines whether command is enabled
or not
- :context-enable {LISP-form} - determines whether command is
enabled or not when used in context menus
- :update-unknown-commands {BOOLEAN [t]} - In case an
available command is added to any toolbar (quick access toolbar,
command mini toolbar) or ribbon button before the definition of the
available command is done the action of the button in the toolbar or
ribbon button is not defined. Such a command is called an 'unknown
command' and is added to the command database as a 'place holder'.
After definition of a new available command the unknown command that
matches application, group and command is replaced by the new command.
This process might decrease the performance. Set this parameter to
nil in case more than a single available command is defined.
For the last command definition set it to t. A single update
of all toolbars and ribbon buttons is enough for updating unknown
commands.
- Return Value:
-
- t - success
- nil - failure
SD-INQ-AVAILABLE-COMMAND-DATA [function]
(sd-inq-available-command-data application group command)
- Description:
-
Inquire the properties of an existing available command with
identification application-group-command.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- Return Value:
-
- values - {PROPERTY LIST} containing the data of the found
available command. A description of the data is listed at sd-define-available-command.
- nil - failure / or command does not exist - 2nd return
value shows reason
SD-DELETE-AVAILABLE-COMMAND [function]
(sd-delete-available-command application group command)
- Description:
-
Deletes an available command with identification
application-group-command. All buttons which refer
to this available command become greyed out.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- Return Value:
-
- t - success
- nil - failure
SD-LOAD-TOOLBAR [function]
(sd-load-toolbar filename :toolbarGroup toolbar-group)
- Description:
-
Loads a toolbar which is defined in a definition file with name
filename. If this toolbar belongs to an application which is
currently not activated or not current, the toolbar will be
invisible.
If you specify the optional toolbar-group you'll assign automatically this group to this
toolbar.
- Parameters:
-
- filename {STRING}
- Absolute or relative (to Creo Elements/Direct Modeling's search
directories) path to a toolbar definition file. Please see
$INSTALLDIR/personality/sd_customize/*.tlb for examples of
toolbar definition files.
- :toolbarGroup {STRING}
- Assigns the passed toolbar group automatically to this toolbar.
Use this parameter if you want to remove a collection of toolbars
belonging to a specific group automatically via sd-remove-all-toolbars.
- Return Value:
-
- list - list of toolbar name and application
- nil - failure
- Examples:
-
(sd-load-toolbar "c:/users/joe/Modeling/my_stuff/power1.tlb")
=> ("Power 1" "SolidDesigner")
(sd-load-toolbar "c:/users/joe/Modeling/my_stuff/simply.tlb" :toolbarGroup "Simplification")
=> ("Simplification" "SolidDesigner")
SD-LOAD-ALL-TOOLBARS [function]
(sd-load-all-toolbars directory :toolbarGroup toolbar-group)
- Description:
-
Loads all toolbars in directory if directory is a valid
existing directory, or in a directory relative to the
User/Site/Corp/SD customization directories.
If you specify the optional toolbar-group you'll assign automatically this group to all
loaded toolbars.
- Parameters:
-
- directory {STRING} - Existing directory or relative
directory
- :toolbarGroup {STRING}
- Assigns the passed toolbar group automatically to every loaded
toolbar. Use this parameter if you want to remove a collection of
toolbars belonging to a specific group automatically via sd-remove-all-toolbars.
- Return Value:
-
- list of lists - list of lists of toolbar name and
application
- nil - failure
- Examples:
-
Existing directory:
(sd-load-all-toolbars "C:/users/joe/my_toolbars")
=> (("Power 1" "SolidDesigner") ("Anno 1" "Annotation") ...)
Relative directory:
(sd-load-all-toolbars "VAR_app")
loads all *.tlb files in the following directories
(Toolbars with same names will overwrite each other):
1. $SDCORPCUSTOMIZEDIR/VAR_app/*.tlb (if set)
2. $SDSITECUSTOMIZEDIR/VAR_app/*.tlb (if set)
3a. $SDUSERCUSTOMIZEDIR/VAR_app/*.tlb (if set) or
3b. $USER_PROFILE_DIR/PTC/Creo Elements Direct Modeling 20.7.1.0/20.7/VAR_app/*.tlb
Load all Design Simplification Toolbars from user/site/corp/sd
directories (subdirectory "DesignSimp") and assign toolbar group
"Simplification" to each loaded toolbar:
(sd-load-all-toolbars "DesignSimp" :toolbarGroup "Simplification")
SD-SHOW-TOOLBAR [function]
(sd-show-toolbar toolbar-name :application application)
- Description:
-
Shows a toolbar with name toolbar-name which belongs to
application. Usually this function is not necessary to call
manually since showing and hiding of application specific toolbars is
done automatically.
Note: The parameter toolbar-name indicates the not
localized internal toolbar identifier string and not the localized
string which appears in the UI as toolbar title. See the toolbar
definition file: toolbar-name is the one next to :name
and not the one given as :title parameter.
- Parameters:
-
- toolbar-name {STRING} - Name of toolbar to show
- :application {STRING [SolidDesigner]} - Name of application
this toolbar belongs to
- Return Value:
-
- t - success
- nil - failure
- Examples:
-
(sd-show-toolbar "Standard")
(sd-show-toolbar "View" :application "Annotation")
SD-HIDE-TOOLBAR [function]
(sd-hide-toolbar toolbar-name :application application)
- Description:
-
Hides a toolbar with name toolbar-name which belongs to
application. Usually this function is not necessary to call
manually since showing and hiding of application specific toolbars is
done automatically.
Note: The parameter toolbar-name indicates the not
localized internal toolbar identifier string and not the localized
string which appears in the UI as toolbar title. See the toolbar
definition file: toolbar-name is the one next to :name
and not the one given as :title parameter.
- Parameters:
-
- toolbar-name {STRING} - Name of toolbar to hide
- :application {STRING [SolidDesigner]} - Name of application
this toolbar belongs to
- Return Value:
-
- t - success
- nil - failure
- Examples:
-
(sd-hide-toolbar "Standard")
(sd-hide-toolbar "View" :application "Annotation")
SD-ASSIGN-TOOLBAR-GROUP [function]
(sd-assign-toolbar-group toolbar-name :application application
:toolbarGroup toolbar-group)
- Description:
-
Assigns the toolbar-group to the toolbar identified by
toolbar-name and application. See sd-load-toolbar, sd-load-all-toolbars, sd-remove-toolbar and sd-remove-all-toolbars for more
information.
- Parameters:
-
- toolbar-name {STRING} - Name of toolbar
- :application {STRING [SolidDesigner]} - Name of application
this toolbar belongs to
- :toolbarGroup {STRING} - Toolbar group which should be
assigned to toolbar
- Return Value:
-
- t - success
- nil - failure
SD-REMOVE-TOOLBAR [function]
(sd-remove-toolbar toolbar-name :application application)
- Description:
-
Removes the toolbar identified by toolbar-name and
application from the current Creo Elements/Direct Modeling
session.
This call guarantees that the docking information (screen location,
docked or floating and visibility state) is kept in all applications
where this toolbar was accessible.
Use this call to remove a toolbar again from Creo Elements/Direct
Modeling (loaded by some add-on functionality) in case the user
deactivates the add-on functionality module (e.g. Simplification
or Relations (Assembly, Parametrics)).
- Parameters:
-
- toolbar-name {STRING} - Name of toolbar
- :application {STRING [SolidDesigner]} - Name of application
this toolbar belongs to
- Return Value:
-
- t - success
- nil - failure
SD-REMOVE-ALL-TOOLBARS [function]
(sd-remove-all-toolbars :toolbarGroup toolbar-group)
- Description:
-
Removes all toolbars which belong to the specified toolbar-group
from the current Creo Elements/Direct Modeling session.
This call guarantees that the docking information (screen location,
docked or floating and visibility state) of each toolbar is kept in all
applications where the toolbar was accessible.
Use this call to remove all toolbars again from Creo Elements/Direct
Modeling (loaded by sd-load-all-toolbars) in case the user
deactivates add-on functionality (e.g. Simplification or
Relations (Assembly, Parametrics)) which caused the load of the
toolbars.
Note: This call is NOT necessary if you want to remove
toolbars which belong to an application like SheetAdviser. On
deactivation of those applications, all toolbars belonging to that
application are removed automatically.
- Parameters:
-
- :toolbar-group {STRING} - Name of toolbar group
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-remove-all-toolbars :toolbarGroup "Simplification")
SD-TOOLBAR-VISIBLE-P [function]
(sd-toolbar-visible-p toolbar-name :application application)
- Description:
-
Checks if toolbar with name toolbar-name which belongs to
application is visible or not.
- Parameters:
-
- toolbar-name {STRING} - Name of toolbar to check
- :application {STRING [SolidDesigner]} - Name of application
this toolbar belongs to
- Return Value:
-
- t - toolbar is visible, docked or floating
- nil - toolbar is invisible or does not exist
SD-SET-TOOLBAR-BUTTON [function]
(sd-set-toolbar-button application group command)
- Description:
-
Makes an available command button identified by application,
group and command look pressed in on toolbars and context
menus.
The right identifier strings can be looked up in
personality/sd_customize/sd_avail_cmds.cmd or in the file where
the available command is specified in.
Note: The action associated with this button does not get executed with
this function.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-set-toolbar-button "SolidDesigner" "Show" "3D Geometry On/Off")
SD-RESET-TOOLBAR-BUTTON [function]
(sd-reset-toolbar-button application group command)
- Description:
-
Makes an available command button identified by application,
group and command look normal (not pressed in) on toolbars
and context menus.
The right identifier strings can be looked up in
personality/sd_customize/sd_avail_cmds.cmd or in the file where
the available command is specified in.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-reset-toolbar-button "SolidDesigner" "Show" "3D Geometry On/Off")
SD-GET-TOOLBAR-COMBOBOX-SELECTED-ITEM [function]
(sd-get-toolbar-combobox-selected-item application group command)
- Description:
-
Returns the current selected item of an available command (specified by
application, group and command) which has a
range specification.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- Return Value:
-
- item {STRING} - the selected item
- nil - failure
- Example:
-
(sd-get-toolbar-combobox-selected-item "SolidDesigner" "Select" "Preselection")
=> "All"
SD-SET-TOOLBAR-COMBOBOX-SELECTED-ITEM [function]
(sd-set-toolbar-combobox-selected-item application group command item)
- Description:
-
Sets the current selected item of an available command (specified by
application, group and command) which has a
range specification.
Note: The action associated with this range item does not get executed
with this function.
- Parameters:
-
- application {STRING} - Name of application
- group {STRING} - Name of group
- command {STRING} - Name of command
- item {STRING} - Identifier of range item
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-set-toolbar-combobox-selected-item "SolidDesigner" "Select" "Preselection" "Part")
SD-LOAD-CUSTOMIZATION-FILE [function]
(sd-load-customization-file basename :subdirectory subdirectory
:application application
:which which
:order order)
- Description:
-
Loads a customization file from one or more customization
directories.
If subdirectory is given, the file which is loaded is searched as
subdirectory/basename.
If application is given instead of subdirectory, the file
which is searched is composed out of information held in a table which
is written at startup time as README.txt to your personal
customization directory. Depending on the values in this table, the
filename is
application-subdirectory/application-file-prefix_basename.
If neither subdirectory nor application is given, the
basename itself is taken to be searched in the customization
directories.
- Parameters:
-
- basename {STRING} - base name of the file to be loaded
- :subdirectory {STRING}
- Optional subdirectory to be searched in the user/site/corp
customization directories. Note: This directory is always
relative to the customization directories and the string has to end
with a "/".
- :application {STRING}
- Alternative way to specify a relative filename to be loaded. Based
on information written to SDUSERCUSTOMIZEDIR/README.txt the
filename to be loaded is
application-subdirectory/application-file-prefix_basename.
Note, if no prefix is given, the basename itself is taken. If no
application specific subdirectory is given, the file will be loaded
from the stock user/site/corp directories.
This string is the internal application name which is listed in the
fourth column of the README.txt file.
- :which {KEYWORD :all or :first
[:all]}
- Indicates whether all files found according to the order given in
order should be loaded or just the first. If you want to load
just the first file found according to the order given, please specify
:first for this parameter.
- :order {KEYWORD [see below]}
-
Specifies the order how files will be loaded if found. It can be one
of:
- :sd-corp-site-user or
- :user-site-corp-sd
If :which is set to :all the default order is
:sd-corp-site-user, i.e. the file will be loaded first from
the personality/sd_customize directory, then from a corp,
site and finally from the user directory if found in any of the
directories.
If :which is set to :first the default order is
:user-site-corp-sd, i.e. Creo Elements/Direct Modeling
starts searching for the file from the user directory on.
- Return value:
-
- filename - In case of which set to :first
and a file was found
- (list of filenames) - If which was set to
:all this list contains the full path of all files
loaded
- nil - no customization file found and loaded
- Examples:
-
(sd-load-customization-file "sd_customize")
(sd-load-customization-file "am_customize" :subdirectory "ANNOTATION/")
is equivalent to
(sd-load-customization-file "customize" :application "Annotation")
SD-GET-CUSTOMIZATION-FILE [function]
(sd-get-customization-file basename :subdirectory subdirectory
:application application
:first-found first-found)
- Description:
-
Retrieves a user/site/corp/sd customization file and returns one or all
found files with full pathname(s).
If subdirectory is given, the file which is searched is composed
out of subdirectory/basename.
If application is given instead of subdirectory, the file
which is searched is composed out of information held in a table which
is written at startup time as README.txt to your personal
customization directory. Depending on the values in this table, the
filename is
application-subdirectory/application-file-prefix_basename.
If neither subdirectory nor application is given, the
basename itself is taken to be searched in the customization
directories.
- Parameters:
-
- basename {STRING} - base name of the file to be
searched
- :subdirectory {STRING [""]}
- Optional subdirectory to be searched in the user/site/corp
customization directories. Note: This directory is always
relative to the customization directories and the string has to end
with a "/".
- :application {STRING}
- Alternative way to specify a relative filename to be searched.
Based on information written to SDUSERCUSTOMIZEDIR/README.txt
the filename to be searched is
application-subdirectory/application-file-prefix_basename.
Note, if no prefix is given, the basename itself is taken. If no
application specific subdirectory is given, the file will be searched
in the stock user/site/corp directories.
This string is the internal application name which is listed in the
fourth column of the README.txt file.
- :first-found {BOOLEAN [t]}
-
Indicates whether search should terminate with the first file found.
The order of search is:
- User customization directory ($USER_PROFILE_DIR/PTC/Creo
Elements Direct Modeling 20.7.1.0/'major'.'minor')
- Site customization directory (i.e.
$SDSITECUSTOMIZEDIR)
- Corporate customization directory (i.e.
$SDCORPCUSTOMIZEDIR)
- Creo Elements/Direct Modeling customization directory
($SDDIR/personality/sd_customize)
If this variable is set to NIL, this function returns
all files found as a list. In the other case the first file found is
returned.
- Return value:
-
- multiple values: <filename> <type>
-
Case :first-found is set to T:
- First value returned: filename with full path
- Second value returned: type, one of the following
keywords:
to indicate where the file was found; either in the
user/site/corp or Creo Elements/Direct Modeling default
customization directory.
Case :first-found is set to NIL:
- First value returned: List of filenames
- Second value returned: List of corresponding types
- nil - no customization file found
- Examples:
-
(sd-get-customization-file "sd_customize")
=> 1. "$USER_PROFILE_DIR/PTC/Creo Elements Direct Modeling 20.7.1.0/20.7/sd_customize"
2. :user
(sd-get-customization-file "machine.tlb" :subdirectory "toolbars/")
=> 1. "I:/Modeling_Site/toolbars/machine.tlb"
2. :site
SD-GET-APP-SPECIFIC-CUSTOMIZATION-FILE [function]
(sd-get-app-specific-customization-file basename application)
- Description:
- Equivalent to (sd-get-customization-file basename
:application application :first-found t).
For more information, see sd-get-customization-file.
SD-INQ-APP-SPECIFIC-USER-CUSTOMIZATION-DIR [function]
(sd-inq-app-specific-user-customization-dir application
:create-if-needed create-if-needed)
- Description:
-
Returns the full path to the application specific customization
directory under your personal customization directory. If the specific
directory does not exist yet and :create-if-needed is set to
T, it will be created.
Please see SDUSERCUSTOMIZEDIR/README.txt for details.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken to get the
information from the table on how the application specific
subdirectory should be named.
Note: If application is not found in the table, a directory
with name application will be created/returned under your
personal customization directory.
- :create-if-needed {BOOLEAN [t]}
- If the application specific user customization directory does not
exist yet, it will be created automatically if this flag is set to
T.
- Return value:
-
- directory - full path to the application specific user
customization directory
- nil - no directory found or could not be created
- Example:
-
(sd-inq-app-specific-user-customization-dir "Annotation")
=> "C:/Documents and Settings/joe/Application Data/PTC/Creo Elements Direct Modeling 20.7.1.0/20.7/ANNOTATION"
SD-INQ-APP-SPECIFIC-USER-CUSTOMIZATION-FILE [function]
(sd-inq-app-specific-user-customization-file basename application)
- Description:
-
Returns the full path to a file in your personal customization directory
composed out of information given in basename and
application. Note, neither the file nor the application specific
subdirectory need to exist. If the subdirectory does not exist yet, it
will be created.
The application specific subdirectory and prefix information is taken
from an internal table which is written at Creo Elements/Direct Modeling
startup as README.txt to your personal customization
directory.
The returned filename looks like this:
$PROFILE/Application Data/PTC/Creo Elements Direct Modeling
20.7.1.0/20.7/'app-subdir'/'app-prefix'_basename
- Parameters:
-
- basename {STRING} - the basename of the file to return (see
above)
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken to get the
information from the table on how the application specific
subdirectory and the application specific file prefix are.
- Return value:
-
- filename - full path to the file as explained above
- nil - directory could not be created
- Example:
-
(sd-inq-app-specific-user-customization-file "ui_layout.dat" "Annotation")
=> C:/Documents and Settings/joe/Application Data/PTC/Creo Elements Direct Modeling 20.7.1.0/20.7/ANNOTATION/am_ui_layout.dat
SD-GET-APP-CUSTOMIZATION-SUBDIRECTORY [function]
(sd-get-app-customization-subdirectory application)
- Description:
-
Access function to return the application specific subdirectory name as
defined in the internal table. This table is written at Creo
Elements/Direct Modeling startup as README.txt to your personal
customization directory.
Note: This function neither creates any directories nor returns a full
path to a directory.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken as key to
return the application specific subdirectory name as defined in the
table.
- Return value:
-
- directory-name - application specific subdirectory
name
- application - in case no subdirectory is defined in
table which fits to application
- Example:
-
(sd-get-app-customization-subdirectory "Annotation")
=> "ANNOTATION"
SD-GET-APP-CUSTOMIZATION-FILE-PREFIX [function]
(sd-get-app-customization-file-prefix application)
- Description:
-
Access function to return the application specific file prefix as
defined in the internal table. This table is written at Creo
Elements/Direct Modeling startup as README.txt to your personal
customization directory.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken as key to
return the application specific file prefix as defined in the
table.
- Return value:
-
- file-prefix - application specific file prefix
- "" - in case no file prefix is defined in table which fits
to application
- Example:
-
(sd-get-app-customization-file-prefix "Annotation")
=> "am"
SD-GET-APP-EXTERNAL-NAME [function]
(sd-get-app-external-name application)
- Description:
-
Access function to return the official external product name for
application. This information is taken from an internal table
which is written at Creo Elements/Direct Modeling startup as
README.txt to your personal customization directory.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken as key to
return the external application name in the table.
- Return value:
-
- name - the external application name
- application - in case no external name is defined in
table which fits to application
- Example:
-
(sd-get-app-external-name "SolidDesigner")
=> "Modeling"
SD-ADD-APPLICATION-DATA [function]
(sd-add-application-data application
subdirectory
prefix
external)
- Description:
-
Adds a new entry to an internal table which maps the application name to
its specific subdirectory, prefix, and external product name. The
initial table is written at Creo Elements/Direct Modeling startup as
README.txt to your personal customization directory.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken as key to
return application specific data.
- subdirectory {STRING}
- String as written in the second column in
SDUSERCUSTOMIZEDIR/README.txt. It represents the application
specific subdirectory name.
- prefix {STRING}
- String as written in the third column in
SDUSERCUSTOMIZEDIR/README.txt. It represents the application
specific file prefix.
- external {STRING}
- String as written in the first column in
SDUSERCUSTOMIZEDIR/README.txt. It represents the application
specific product name.
- Return value:
-
- t - success
- nil - failure
- Example:
-
(sd-add-application-data "NewApplication" ;; internal application name
"NewAppDir" ;; application subdirectory
"na" ;; file prefix
"NewApplication") ;; external product name
=> t
SD-INQ-APPLICATION-DATA-P [function]
(sd-inq-application-data-p application)
- Description:
-
This function returns T if there is a data entry for the
specified application in the internal table which maps the application
name to its specific subdirectory, prefix, and external product name.
The initial table is written at Creo Elements/Direct Modeling startup as
README.txt to your personal customization directory.
- Parameters:
-
- application {STRING}
- String as written in the fourth column in
SDUSERCUSTOMIZEDIR/README.txt. This name is taken as key to
return application specific data.
- Return value:
-
- t - success
- nil - failure
- Example:
-
(sd-inq-application-data-p "SolidDesigner")
=> t
© 2024 Parametric
Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved |