# CopyUpSegment
Keywords: stratus

Subsections

- Name
- Synopsys
- Description
- Parameters
- Example
- Errors
- See Also

##
CopyUpSegment

### Name

CopyUpSegment - Copies the segment of an instance in the current cell

### Synopsys

    CopyUpSegment ( pathname, netname, newnet  )

### Description

Duplication of a segment.
The segment is created with the same cordinates and layer as the segment corresponding to the net `netname` in the instance found thanks to `pathname`. It belongs to the net `newnet`.
Note that if several segments correspond to the net, they are all going to be copied.

### Parameters

- `pathname` : The path in order to obtain, from the top cell, the instance the net `netname` belongs to
- `netname` : The name of the net which the segment belongs to
- `net` : The net which the top cell segment os going to belong to

### Example

    CopuUpSegment ( "my_dpgen_and2.cell_1", "i0", myNet )

### Errors

Some errors may occur :

- `[Stratus ERROR] CopyUpSegment :`
  `The instance's path must be put with a string.`
- `[Stratus ERROR] CopyUpSegment :`
  `The segment must be done with it's name : a string.`
- `[Stratus ERROR] CopyUpSegment :`
  `No net found with name ... in masterCell ...`
  There is no net with name `netname` in the instance found thanks to the path `pathname`.
- `[Stratus ERROR] CopyUpSegment :`
  `No segment found with net ... in masterCell ...`
  The net with name `netname` has no segment. So the copy of segment can not be done.
- `[Stratus ERROR] CopyUpSegment :`
  `the segment of net ... are not of type CALU.`
  In other words, the net is not an external net. The copy can be done only with external nets.

### See Also

Introduction Layout PlaceSegment PlaceContact PlacePin PlaceRef GetRefXY