mdlIObject GetLocalAddressFromGlobalAddress
Gets the local address from the specified global address.
Syntax
mdlIObject_handle GetLocalAddressFromGlobalAddress entity_varname
Application
MotionView Tcl Query
Description
This command obtains the local address. The local address can be thought of as the full variable name which starts from the ‘mdlIObject_handle’ (excluding mdlIObject_handle) instead of MODEL. For example, if there is an entity MODEL.sys_0.assem_0.b_0, the Local Address of this entity (with regard to sys_0) will be assem_0.b_0. The 'mdlIObject_handle’ is the handle of entity on which the command is executed.
Inputs
- entity_varname
- The variable name of an entity whose local address is desired.
Example
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 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 InterpretEntity temp "Body" b_0 "\"BodyLabel\""
assem_handle GetLocalAddressFromGlobalAddress MODEL.assem_0.b_0
temp ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
Errors
Returns the local address if successful. If there is an error, an error code will be returned.