There may be cases where using "SendStringToExecute()" makes sense, but
since you are "new to programming...", it is definitely not good way to try
out Acad .NET API. You should avoid the temptation of doing programming as
if you are just issuing Acad built-in commands (running script file *.scr
would be a lot easier for that). SendStringToExecute() is rather advanced
topic.
For your question of creating a text in drawing, there is .NET API
object/method to create text (DBText/MText).
"dawoodeg" wrote in message news:6350149@discussion.autodesk.com...
Hello,
I`m v.new to programming vb.net 2005 with AutoCAD 2008.
I just saw a presentation about how to send commands through
SendStringToExecute method.
My code is like that:
Imports System
Imports System.IO
Imports System.Collections.Generic
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports AcadApp = Autodesk.AutoCAD.ApplicationServices.Application
Public Class DGCommand
_
Public Sub Asdkcmd1()
Dim acDoc As Document =
AcadApp.DocumentManager.MdiActiveDocument
acDoc.SendStringToExecute("._text '(10.0 10.0 0.0) 5 0
TestArcGIS", False, False, False)
acDoc.SendStringToExecute("(\n)", False, False, False)
End Sub
End Class
This script code ("._text '(10.0 10.0 0.0) 5 0 TestArcGIS", False, False,
False) is not correct.
Can anyone help me with this easy task.
Thanks