Best Practices: Using Copy and Paste

Using Copy and Paste to add a new object to the scenario can save time and reduce errors if the properties of the new object are similar to the properties of an existing object, or if the new object and an existing object have the same sub-objects.

Astrogator users: Copy and Paste are also available to construct and edit a Mission Control Sequence (MCS) tree.

You can also use Cut instead of Copy to move an object from one part of the scenario to another part.

When to use it

In general, Copy and Paste can be convenient if:

  • The new object shares several properties with an existing object of the same class in the scenario, or
  • The new object and an existing object of the same class have identical or similar sets of children (sub-objects).

Example: You want to add to the scenario a new satellite that shares several properties with an existing satellite (such as attitude, 2D and 3D graphics, constraints, RF properties, etc.). Not all of the properties need to be identical. For example, some of the orbital elements of the new satellite may differ from the orbital elements of the existing satellite. In this situation, to save time, make a copy of the existing satellite, and then edit the properties that are different. Copy and Paste will save you even more time if the existing satellite has a sensor attached to it and the new satellite will have an identical or similar sensor.

You can paste the same object repeatedly to add multiple copies to the scenario.

When would you not use copy and paste? If the properties of the new object differ in many respects from the properties of existing objects of the same class, it is probably better to create an entirely new object. Otherwise, there is a risk that you will forget to change a non-default setting that you made for the existing object but do not wish to apply to the new object.

How to use it

There are four ways to copy and paste objects in STK. To copy an object, select it in the Object Browser and

  • Select Copy from the Edit menu, or
  • Click in the toolbar, or
  • Right-click the mouse and select Copy from the context menu, or
  • Use the keyboard shortcut Ctrl-C.

To paste an object, select its destination object (see more, below) and

  • Select Paste from the Edit menu, or
  • Click in the toolbar, or
  • Right-click the mouse and select Paste from the context menu, or
  • Use the keyboard shortcut Ctrl-V.

Analogous procedures exist for Cut and Paste, including a toolbar button and the keyboard shortcut Ctrl-X.

Where to paste an object

After you have copied an object, where do you paste it? The short answer is: paste it anywhere that you can create an object of that class. In general, you should select the intended parent of the new object: if the copied object is a satellite, select the scenario; if it is a sensor, select the object to which you want to attach it (e.g. a satellite or facility).

STK allows you to select the copied object's intended sibling, that is, an object that will have the same parent. For example, if you copy a satellite, you can paste it to any other object at the same level in the scenario -- such as another satellite or a facility. The new satellite will be a child of the scenario, as expected. However, it is better to use the intended parent consistently as the pasting destination, since it avoids unexpected results in a case where the copied object can have parents at different levels in the scenario. For example, a receiver, transmitter or radar can be attached to an object immediately below the scenario level, such as a satellite or facility, or to a sensor, which is two levels below the scenario. If you copy a receiver and select a sensor as the pasting destination, the receiver will become the sensor's child, not its sibling. If you want the receiver to be the sensor's sibling, you must select the sensor's parent object as the destination of the paste.

Automatic naming of pasted objects

When you copy an object and paste it so that it has the same parent as the original object, STK will automatically assign the new object a name that is derived from the name of the original object by appending a number. The appended number will be the smallest available integer that will distinguish the new object from all other objects of the same class that share the same parent. Thus, if you make a copy of Satellite1, and there is no Satellite2 in the scenario, the new satellite will be named Satellite2. If the current satellites are named Satellite2 and Satellite3 (perhaps because you deleted Satellite1), the new satellite will be named Satellite1.

If an object is copied and pasted to a different parent than the parent of the original object, it is not renamed. Thus, if you copy a sensor from one satellite to another, it will keep its name. Similarly, if you copy and paste an object with children (such as a satellite with transmitters attached to it), the children are not renamed.