为Document.BeginDwgOpen注册事件
Before DWG Open Event Handler
注册事件有先后
先DocumentCreateStarted事件
Public Sub AddDocumentCreateStartedEvent()
AddHandler Application.DocumentManager.DocumentCreateStarted, AddressOf Application_DocumentCreateStarted
End Sub
再BeginDwgOpen事件
Private Sub Application_DocumentCreateStarted(ByVal sender As Object, ByVal e As DocumentCollectionEventArgs)
AddHandler e.Document.BeginDwgOpen, AddressOf Document_BeginDwgOpen
End Sub
Public Sub Document_BeginDwgOpen(ByVal senderObj As Object, _
ByVal docBegClsEvtArgs As DrawingOpenEventArgs)
End Sub
Creates a new toolbar
欢迎关注微信公众账号ByCAD