/
replaceNamespace
replaceNamespace
Description
Replaces all instances of a selected or specified namespace.
All modules under the same parent can be considered in the namespace of that parent, using slashes ( / ) to separate each module's parent's name. replaceNamespace operates on all selected modules unless you use the -onMod
flag to specify the module on which to operate by name.
Note that you may specify the path in commands that require a module name, but you may not specify the path as a module name in the Name attribute.
You need to specify only what is required to uniquely identify the name.
Functional area
Namespace
Command syntax
Syntax
replaceNamespace oldNamespace newNamespace[-onMod string] |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
oldNamespace | string | Yes | Specify the path of a namespace using slashes ( / ), or colons ( : ). The number of namespaces in a module name is not limited. Note that if the module contains the same namespace twice, replaceNamespace removes all instances. |
newNamespace | string | Yes | Specify the path of a namespace using slashes ( / ), or colons ( : ). The number of namespaces in a module name is not limited. |
Flags
Name | Flag arguments | Argument type | Exclusive to | Comments |
---|---|---|---|---|
onMod | 1 | string | — | Specifies the module on which the command operates. |
Return value
void
Example
// Replace a namespace called Bob with a namespace called Joe replaceNamespace "Bob" "Joe";
Additional information
Related commands
, multiple selections available,
Related content
removeNamespace
removeNamespace
More like this
addNamespace
addNamespace
More like this
getNamespace
getNamespace
More like this
renameShelfGroup
renameShelfGroup
More like this
strReplace
strReplace
More like this
renameParameter
renameParameter
More like this