vba+Sendcommand模拟peidt
图示是由两个线段和一格弧构成。下面程序模拟peidt将三条线转换为多段线。Sub ll()
ss = Array("EC", "EF", "EE")
tt = "pedit(handent " & Chr(34) & ss(0) & Chr(34) & ")" & vbCr & "y" & vbCr & "j" & vbCr
Debug.Print tt
For ii = 1 To 2
tt = tt & "(handent " & Chr(34) & ss(ii) & Chr(34) & ")" & vbCr
Debug.Print tt
Next ii
Debug.Print tt
'"j" (handent "ef") (handent "ee") "" "")
ThisDrawing.SendCommand tt & vbCr & vbCr
End Sub
好是好,但一般不推荐在VBA中使用SendCommand。除非不得已。
页:
[1]