21, Feb, 2019

AutoCAD VBA sample code – Insert text inside drawing

Home Forums AutoCAD VBA Discussions AutoCAD VBA sample code – Insert text inside drawing

Tagged: 

This topic contains 0 replies, has 1 voice, and was last updated by  CAAadmin 1 week, 5 days ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1043

    CAAadmin
    Keymaster

    Insert text inside auto-cad drawing
    Insert Text
    Dim textobj As AcadText
    Dim insertionPoint2(0 To 2) As Double

    Dim textString2 As String

    ‘ Define the text object
    textString2 = “Drawn by : ”
    insertionPoint2(0) = 10: insertionPoint2(1) = 10: insertionPoint2(2) = 0
    Height = 4 ‘text height
    ‘ Create the text object in model space
    Set textobj = ThisDrawing.ModelSpace.AddText(textString2, insertionPoint2, Height)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.