PasteDesign (Schematic Editor)

Paste a design that has already been copied to the clipboard into schematic as a subdesign.

Syntax:

PasteDesign(

pasteOption , // see below for values

Array("NAME:Attributes", _

"Page:=", int, _ // [Opt=1] Page number (one-based)

// Note: Page 1 always exists

"X:=", double, _ // X position of the object

"Y:=", double, _ // Y position of the object

"Angle:=", double, _ // Rotation angle (radians)

"Flip:=", bool) // True if mirrored

)

Return Value: Component is created and the returned value has the format CompInst@<CompName>;<compInstID>;<optional schematicID>

For instance a return value CompInst@CAP_;4;35 indicates that the component name is CAP_, its ID is 5, and its Schematic ID is 35. These details can be found in the Properties window when you select the created component. The component name and ID can be found in the Gen-eral tab and the Schematic ID can be found in the Symbols tab.

Parameters: pasteOption should be one of the following:

0 to link to the existing design that was copied

1 to create a new copy of the design that was copied but keep the original layers of the design being copied

2 to create a new copy of the design and merge the layers of the design being copied into the design receiving the copy