学习vba
嘿,伙计们,我正在努力学习vba我已经对lisp有了相当多的了解,但我想进入vba
有人能告诉我如何在vba中执行以下操作吗??
;1
(defun c:test ()
(princ)
)
;2
(setq dscl (getvar "dimscale"))
;3
(setvar "dimscale" 1)
4;
(command "-linetype" "_s")
;5
(alert(strcat "\nthis is a test"))
我只是想看看vba中简单的东西是如何工作的
谢谢
Sub Test()
Dim vVar as variant 'Is a variant in case assigned to text or number
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
vVar = ThisDrawing.GetVariable ("DIMSCALE")
ThisDrawing.SetVariable "DIMSCALE" , 1# 'lb sign included if no decimal
ThisDrawing.SendCommand "-LINETYPE" & vbCr & "S" & vbCr & "ByLayer" & vbCr & vbCr
ThisDrawing.Utility.Prompt "this is a test"
End Sub
oops..
If you want a pop up boxit is...
MsgBox "this is a test"
谢谢
当从lisp转换到VBA时,它会堆叠堆
还有几个请求
(setq ss1 (ssget "x"))
(setq EntN (ssname ss1 1))
(setq EntL (entget EntN))
(setq EntT (cdr (assoc 0 EntL)))
(setq EntC (assoc 62 EntL))
(setq ss2 (ssadd))
(if (not EntC)
(ssadd EntN ss2)
);if
页:
[1]