AUTOlisp开发CAD转战VBA开发CAD第三天
本帖最后由 水吉空 于 2018-10-26 15:08 编辑VBA创建单行文字↓↓↓
Public Sub addtext()
Dim pt As Variant
Dim test As String
Dim higt As Double
pt = ThisDrawing.Utility.GetPoint(, "请选择文字插入点:")
test = "lisp翻译vba"
higt = 3
Dim tess As AcadText
Set tess = ThisDrawing.ModelSpace.addtext(test, pt, higt)
End Sub
autolisp翻译VBA创建单行文字↓↓↓
(defun c:tt (/ pt)
(setq pt (getpoint "请选择文字插入点:"))
(Vlax-Invoke-Method (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'ActiveDocument) 'ModelSpace) 'AddText "lisp翻译vba" (Vlax-3d-Point pt) 3 )
(princ)
)
相对于之下lisp写文字比vba写文字更加便捷和简单。
====================水吉空出品===================
微信公众号:通信工程与CAD
你确定你哪是AUTOlisp代码?不是vlisp代码? zzyong00 发表于 2018-10-25 15:31
你确定你哪是AUTOlisp代码?不是vlisp代码?
反正都是lisp嘛 vba比lisp简单吧
页:
[1]