CLI Reference > Workflows and Documents Commands > im insertsegment
 
im insertsegment
inserts an existing segment into a parent segment
Synopsis
im insertsegment[--insertMode=[reference:include]] [--insertLocation[=number|first|last|before:name|after:name] [--parentID=value] [--user=name] [--hostname=server] [--password=password] [--port=number] [--quiet] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [-g|--gui] [--settingsUI=[gui|default]] [--status=[none|gui|default]] segment id...
Description
im insertsegment inserts an existing segment into a parent segment. You can insert the segment into a specified location in the parent segment's structural relationship list. For example:
im insertsegment --parentID=23 --insertLocation=after:34 15
inserts segment 15 into parent segment 23, placing it after ID 34 in the structural relationship list.
Options
This command takes the universal options available to all im commands, as well as some general options. See the options reference page for descriptions.
--parentID=value
the ID of the parent segment or node that will contain the reference to the segment being inserted. This option is required.
--insertLocation[=number|first|last|before:name|after:name]
determines where the segment should go in the parent segment's structural relationship list. You must specify a --parentID. The options are as follows:
first inserts the segment at the beginning of the list
last inserts the segment at the end of the list
before:name inserts the segment before the specified ID
after:name inserts the segment after the specified ID
[0,...] inserts the segment at the specified location. If a negative is specified, the segment is inserted at the beginning of the list. If the number specified is too large, the segment is inserted at the end of the list.
--insertMode=[reference:include]
indicates how related items are to be treated for the segment when it is inserted. This option is required if you specify a --parentID. You cannot use this option without specifying a --parentID. The options are as follows:
reference references related items but does not include them
include includes related items as children of the parent item
segment id...
the ID(s) of the segment(s) being inserted. Use a space separated list to specify more than one segment, for example, 240 241 242.
See Also
Commands: im createsegment, im viewsegment, im branchsegment
Miscellaneous: diagnostics, options, preferences