mdlIObject SetDefinitionName
Sets the definition name of a definition type entity.
Syntax
mdlIObject_handle SetDefinitionName def_name
Application
MotionView Tcl Modify
Description
This command sets the definition name of an object. The objects on which this command can be called are: System, Analysis, Assembly, Graphic System, or Template.
Inputs
- def_name
- The definition name to be set on a system.
Example
To set the definition name of a definition type entity:
hwi GetSessionHandle mySessionName
mySessionName GetProjectHandle myProjectName
set activePageNum [myProjectName GetActivePage]
myProjectName GetPageHandle myPageName $activePageNum
set activeWinNum [myPageName GetActiveWindow]
myPageName GetWindowHandle myWindowName $activeWinNum
myWindowName GetClientHandle myClientName
myClientName GetModelHandle myModelName
myModelName GetObjectHandle obj_handle
obj_handle AddNewAssembly assem_handle assem_0 "\"Assembly 0\"" C:/temp/data_file.mdl C:/temp/def_file.mdl true assem_def_name assem_type;
assem_handle SetDefinitionName assem_new_name
assem_handle ReleaseHandle;
obj_handle ReleaseHandle;
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
Errors
Returns 0 if successful, otherwise an error code.