CopyToClipboard Method (SchematicSheetDocuments Collection)

Scope: Xpedition Designer schematic editor

Collection: SchematicSheetDocuments Collection

Prerequisites: None

Copies sheets from a schematic to the clipboard.

Usage

SchematicSheetDocuments.CopyToClipoard(ByVal SchematicName As String, ByVal SheetsToCopy As IStringList, ByVal srcPath As IStringList)

Arguments

SchematicName

The name of the schematic document containing the sheets to be copied to the clipboard.

SheetsToCopy

A list of one or more sheets within the specified schematic to be copied to the clipboard.

srcPath

The hierarchical path to the schematic document.

Examples

This example copies two schematic sheets to the clipboard, then pastes them into the “nic” symbol.

Figure 1. CopyToClipboard

Note:

Mentor Graphics recommends that you use COM versioning syntax in script examples that use GetObject and CreateObject. Without COM versioning, the script will access the last installation to which the release switcher pointed.

Set Doc = app.SchematicSheetDocuments.Open("Schematic1", "1")

'sheets to copy Schematic1/1/11/(1,2)
set sheets = createobject("viewdraw.stringlist") 
sheets.Append("1")
sheets.Append("2")

Set pathFrom = createobject("viewdraw.stringlist")
pathFrom.Append("Schematic1")
pathFrom.Append("1")
pathFrom.Append("11")

app.SchematicSheetDocuments.CopyToClipboard "11", sheets, pathFrom

msgbox "copied"

' destination Schematic1/2/nic
Set pathTo = createobject("viewdraw.stringlist")
pathTo.Append("Schematic1")
pathTo.Append("2")
pathTo.Append("nic")

set sheets2bereplaced = createobject("viewdraw.stringlist")

app.SchematicSheetDocuments.PasteFromClipboard "nic", pathTo, sheets2bereplaced
Figure 2. PasteFromClipboard