Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2022.2 Object Library
PCDLRN ActiveX DLL > EditWindow Object : PasteFromClipboard Method
PasteFromClipboard Method
Description

 

This method pastes any PC-DMIS commands stored on the Clipboard into the Edit window at the current insertion point. You should first copy the commands using CopySelectedToClipboard

Syntax
Visual Basic
Public Sub PasteFromClipboard() 
Example
This example selects the current command, copies it to the Clipboard, sets the insertion point at the end of the measurement routine and then pastes the copied command.
Sub Main
	Dim App As Object
	Set App = CreateObject ("PCDLRN.Application")
	Dim Part As Object
	Set Part = App.ActivePartProgram
	Dim Ew As Object
	Set Ew = Part.EditWindow
	Dim Cmds As Object
	Set Cmds = Part.Commands
	Dim Cmd As Object
	Set Cmd = Commands.Item("PNT1");
	Cmds.SetCurrentCommand(cmd);
	Ew.CommandMode
	Ew.SelectCommand
	Ew.CopySelectedToClipboard
	Cmds.InsertionPointAfter(Cmds.LastCommand)
	Ew.PasteFromClipboard
End Sub
See Also