IntelliCAD 11.1 Object Library
Copy Method
See Also 
Shape Object : Copy Method

Description

Creates a copy of the entity.

Syntax

Visual Basic
Public Function Copy() As Entity

Example

Private Sub Copy_and_Rotate_Example()

     ' This example creates a line and then copies it.

     ' The new line is then rotated 10 radians.

          

     ' Create the line

     Dim myDoc As IntelliCAD.Document

     Dim myLine As IntelliCAD.Line

     Dim myStartPt As IntelliCAD.Point

     Dim myEndPt As IntelliCAD.Point

     Set myDoc = Application.ActiveDocument

     Set myStartPt = Library.CreatePoint(4, 4)

     Set myEndPt = Library.CreatePoint(7, 3)

     Set myLine = myDoc.ModelSpace.AddLine(myStartPt, myEndPt)

     myLine.Update

 

     ' Copy and rotate the line

     Dim copymyLine As IntelliCAD.Line

     Set copymyLine = myLine.Copy()

     copymyLine.Rotate myStartPt, 10

     MsgBox "Rotated the copied line 10 radians."

     ThisDocument.Application.ZoomExtents

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.