Mccad老师:请教SendCommand的详细用法
Mccad老师:感谢您对我以前的问题的回答。请问您有SendCommand函数的用法的详细说明吗? 看帮助,按F1 谢谢!语法是很简单的,详细用法就很复杂。 <PRE class=Code>这个函数没有什么复杂的地方啊,而且除非没有对应的Method,尽量不要用。</PRE><PRE class=Code>Sub Example_SendCommand()
' This example sends a command to the AutoCAD commandline
' of a particular drawing for evaluation
' We will create a Circle in the active drawing and will
' zoom to display the entire circle
ThisDrawing.SendCommand "_Circle" & vbCr & "2,2,0" & vbCr & "4" & vbCr
ThisDrawing.SendCommand "_zoom" & vbCr & "a" & vbCr
' Refresh view
ThisDrawing.Regen acAllViewports
MsgBox "A circle command has been sent to the command line of the current drawing."
End Sub</PRE> 谢谢!再问复杂一点。例如:通过SendCommand实现‘插入OLE对象’。
怎么办?(ThisDrawing.SendCommand "_InsertObj" & vbCr ????) InsertObj可是有用户界面的,不是单纯在命令行敲命令就能实现的。
SendCommand的功能就是代替在命令行敲命令,用它恐怕实现不了这个功能。 有其他可以替代的手段吗?我想给Cad窗口发送消息应该是可以实现的吧?
页:
[1]