温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
外文
翻译
毕业设计(论文)外文资料翻译
题 目: ActiveX and VBA Reference
院系名称: 专业班级:
学生姓名: 学 号:
指导教师: 教师职称:
起止日期: 地 点:
BeginShortcutMenuOSnap 事件
用户在图形窗口上按鼠标右键后,以及在快捷菜单以osnap模式出现之前被触发。
See Also | Example
用法:
object.BeginShortcutMenuGrip(ShortcutMenu)
对象:
Document 对象
对象表达式,其结果为有效的容器对象,此处必须为文档对象(document)。
ShortcutMenu
快捷菜单
PopupMenu对象:通过操作按钮来输入/输出
快捷菜单即将显示
说明:
这个事件允许你在它显示之前修改快捷菜单。在修改快捷菜单时,通过事件的按钮编辑PopupMenu对象。这种相同的PopupMenu对象也因为当前的快捷菜单正在显示而不能够弹出。使用这个EndShortcutMenu事件利用快捷菜单执行清除工作。
这些事件将被激活,在所有的快捷菜单的要素包括任意ObjectARX命令发生后
当模式对话框显示时不会触发任何事件
参见:
方法,属性,事件:
BeginShortcutMenuCommand
BeginShortcutMenuDefault
BeginShortcutMenuEdit
BeginRightClick
ActiveX 和 VBA开发指导:
“使用事件”
例程:
Private Sub AcadDocument_BeginShortcutMenuOSnap(ShortcutMenu As AutoCAD.IAcadPopupMenu)
本例程演示当在osnap模式下时立即截取一个快捷菜单
MsgBox “你刚才在osnap模式下激活一个快捷菜单”
Deactivate 事件
当图形窗口释放时被触发
See Also | Example
用法:
object.Deactivate()
对象:
Document对象
对象表达式,其结果为有效的容器对象,此处必须为文档对象(document)
说明:
当模式对话框显示时不会触发任何事件
参见 :
方法,属性,事件:
Activate
ActiveX 和 VBA开发指导:
“使用事件”
例程:
Private Sub AcadDocument_Deactivate()
本例程演示截取图形激活事件
当图形不集中时这个事件会被激活
激活示例程序:打开两个图形窗口并从一个图形窗口切换到另一个图形窗口
MsgBox “你刚才激活了一个图形!”
End Sub
EndCommand event
在命令执行完成后立即被触发。
See Also | Example:
用法:
object.EndCommand(CommandName)
对象:
Application
对象表达式,其结果为有效的容器对象,此处必须为文档对象(document)。
CommandName
String
文件被打开
发出的命令的名字。
说明:
这个EndCommand事件紧跟着BeginCommand事件到AutoCAD完成正在执行的命令之后。如果使用者没有取消那个命令,结束命令就不会被触发。
这个开始命令事件被触发为任一基本AutoCAD命令,或任一经由ObjectARX申请登记在AutoCAD指令堆栈上,或视图的 LISP vlax-add-cmd功能 。任何正常的defun'd C将被触发:因为它不能从命令堆栈中显示出来,所以即使你激发它,它也不能完全的发挥功能,。如果你在执行时需要LISP命令被识别出来,你需要用视图的 LISP vlax-add-cmd功能去正确从AutoCAD命令堆栈中激发出来。
如果你没有对一个AutoCAD命令进行定义那么你就利用LISP命令对其重新定义,通常AutoCAD 的命令只有在它们被触发时BeginCommand才被激活。比如("LINE"命令……)。
AutoCAD命令成组的储存在命令堆栈里。一个瞬间命令堆栈在创建per AutoCAD期间。这些堆栈由的基本命令组成,还有任意你加进去的命令。
对话框显示时不会触发任何事件
参见:
方法,属性,事件:
BeginCommand
ActiveX 和VBA开发指导
“使用事件”
例程:
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
'本例程演示截取图形EndCommand事件
'当图形收到任一与本事件有关的命令时此事件被激活。
激活本例程事件:在绘图区点击任意的命令不管是直线命令,VBA, ACAD菜单,ACAD工具栏还是LISP之中的。当这个命令完成后,这个事件将会被激活。
使用周期变化的“CommandName”确定哪个命令刚完成。
MsgBox“一个图形已经完”成& CommandName & “命令”
End Sub
EndLISP event
在LISP表达式执行完成后立即被触发
See Also | Example
用法:
object.EndLISP()
对象:
Application object, Document object
对象表达式,其结果为有效的容器对象,此处必须为文档对象(document)
说明:
这个事件将会被触发,在LISP表达实执行完成后,或撤消对LISP表达式的执行后。
“对话框显示时不会触发任何事件”
参见:
方法,属性,事件:
BeginLISP
ActiveX 和VBA开发指导
“使用事件”
例程:
Private Sub AcadDocument_EndLisp()
'本例程演示截取图形BeginLisp事件
本事件当完成对一图形的LISP表达式的运行时被激活
激活本例程:开始对LISP表达式求值并等着完成求值
MsgBox “一个LISP表达式已经完成求值!”
End Sub
BeginShortcutMenuOSnap event
Triggered after the user right-clicks on the drawing window, and before the shortcut menu appears in osnap mode.
See Also | Example
Signature
object.BeginShortcutMenuGrip(ShortcutMenu)
object
Document object
An object expression that evaluates to a valid container object. In this case, the only valid container is a document.
ShortcutMenu
PopupMenu object; input/output from the handler
The shortcut menu about to be displayed.
Remarks
This event allows you to make changes to the shortcut menu before it is displayed. To make changes to the shortcut menu, edit the PopupMenu object that is passed in to your handler from the event. This same PopupMenu object is passed out as the current shortcut menu. Use the EndShortcutMenu event to perform any cleanup work on the shortcut menu.
This event is triggered after all shortcut menu elements, including any ObjectARX command additions, have occurred.
No events will be fired while a modal dialog is being displayed.
See Also
Methods, Properties, and Events:
BeginShortcutMenuCommand
BeginShortcutMenuDefault
BeginShortcutMenuEdit
BeginRightClick
ActiveX and VBA Developer's Guide:
"Use Events"
Example
Private Sub AcadDocument_BeginShortcutMenuOSnap(ShortcutMenu As AutoCAD.IAcadPopupMenu)
' This example intercepts a shortcut menu start while you are in the osnap mode.
'
MsgBox "You have just initiated a shortcut menu in osnap mode!"
End Sub
Deactivate event
Triggered when the drawing window is deactivated.
See Also | Example
Signature
object.Deactivate()
object
Document object
An object expression that evaluates to a valid container object. In this case, the only valid container is a document.
Remarks
No events will be fired while a modal dialog is being displayed.
See Also
Methods, Properties, and Events:
Activate
ActiveX and VBA Developer's Guide:
"Use Events
Example
Private Sub AcadDocument_Deactivate()
' This example intercepts a drawing DeActivate event.
'
' This event is triggered when a drawing window looses focus.
'
' To trigger this example event: Open two drawings and switch from
' one drawing window to another
MsgBox "You have just deactivated a drawing!"
End Sub
EndCommand event
Triggered immediately after a command completes.
See Also | Example
Signature
object.EndCommand(CommandName)
object
Application
An object expression that evaluates to a valid container object. In this case, the only valid container is the application.
CommandName
String
The name of the command that was issued.
Remarks
The EndCommand event follows the BeginCommand event after AutoCAD completes processing the command. If the user cancels out of the command, the EndCommand event will not be triggered.
The BeginCommand event will be fired for any basic AutoCAD command, or any command registered on the AutoCAD command stack via an ObjectARX application, or the Visual LISP vlax-add-cmd function. It will not be fired for any normally defun'd C: LISP function because it is not exposed to the command stack, even though you execute it from the AutoCAD command Line. If you need LISP commands to be recognized when they execute, you will need to use the Visual LISP vlax-add-cmd function to register the command correctly to the AutoCAD command stack.
If you undefine an AutoCAD command and then redefine it via a LISP defun, the BeginCommand event may not be triggered until an actual AutoCAD command is called; for example, (command "_.LINE" ...).
AutoCAD commands are stored in groups in the command stack. One instance of the command stack is created per AutoCAD session. This stack consists of the native AutoCAD commands, as well as any custom commands you add to it.
No events will be fired while a modal dialog is being displayed.
See Also
Methods, Properties, and Events:
BeginCommand
ActiveX and VBA Developer's Guide:
"Use Events
Example
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
' This example intercepts a drawing EndCommand event.
'
' This event is triggered when a drawing receives
' any command compatible with this event.
'
' To trigger this example event: Issue any command to an open drawing from
' either the command line, VBA, the ACAD menus, the ACAD toolbars, or LISP.
' When the command is finished, this event will be triggered.
' Use the "CommandName" variable to determine which command just finished
MsgBox "A drawing has just finished a " & CommandName & " command."
End Sub
EndLISP event
Triggered upon completion of evaluating a LISP expression.
See Also | Example
Signature
object.EndLISP()
object
Application object, Document object
An object expression that evaluates to a valid container object. In this case, the only valid containers are the application and a document.
Remarks
This event will occur after either a normal termination of the LISP evaluation, or after a cancellation of the LISP evaluation.
No events will be fired while a modal dialog is being displayed.
See Also
Methods, Properties, and Events:
BeginLISP
ActiveX and VBA Developer's Guide:
"Use Events
Example
Private Sub AcadDocument_EndLisp()
' This example intercepts a drawing BeginLisp event.
'
' This event is triggered when a drawing finishes
' a the evaluation of a LISP expression.
'
' To trigger this example event: Start the evaluation of a LISP expression and
' wait for it to finish being evaluated
MsgBox "A LISP expression has just finished being evaluated!"
End Sub