CancelSubscriptionToAddFileNotification 方法 (ActiveX/ATO)
注销以前注册的添加文件回调通知处理程序。 命名空间:传输塔利布 程序集: acETransmit20.tlb 签名VB.NET: object.cancelSubscriptionToAddFileNotification pHandler C#: object.cancelSubscriptionToAddFileNotification(pHandler);
返回值 (RetVal)无返回值。 言论没有其他评论。 发行信息释放:AutoCAD 2004 及更高版本 例子VB.NET: ' Notification handlers Private Shared g_dbHandler As New MyTransDbNotifier Private Shared g_fileHandler As New MyTransFileNotifier Private Shared g_ssmHandler As New MyTransSSMNotifier ' Custom command that subscribes to eTransmit notifications ' Works with the transmittal API and ETRANSMIT/ARCHIVE commands <CommandMethod("ETNotificationsStart")> _ Public Shared Sub ETNotificationsStart() ' Add the handlers g_tro.subscribeToAddFileNotification(g_fileHandler) g_tro.subscribeDatabaseNotification(g_dbHandler) g_tro.subscribeSheetSetNotification(g_ssmHandler) End Sub ' Custom command that unsubscribes to eTransmit notifications ' Works with the transmittal API and ETRANSMIT/ARCHIVE commands <CommandMethod("ETNotificationsEnd")> _ Public Shared Sub ETNotificationsEnd() ' Remove the handlers g_tro.cancelSubscriptionToAddFileNotification(g_fileHandler) g_tro.cancelDatabaseNotification(g_dbHandler) g_tro.cancelSheetSetNotification(g_ssmHandler) End Sub C#: // Notification handlers private static MyTransDbNotifier g_dbHandler = new MyTransDbNotifier(); private static MyTransFileNotifier g_fileHandler = new MyTransFileNotifier(); private static MyTransSSMNotifier g_ssmHandler = new MyTransSSMNotifier(); // Custom command that subscribes to eTransmit notifications // Works with the transmittal API and ETRANSMIT/ARCHIVE commands [CommandMethod("ETNotificationsStart")] public static void ETNotificationsStart() { // Add the handlers g_tro.subscribeToAddFileNotification(g_fileHandler); g_tro.subscribeDatabaseNotification(g_dbHandler); g_tro.subscribeSheetSetNotification(g_ssmHandler); } // Custom command that unsubscribes to eTransmit notifications // Works with the transmittal API and ETRANSMIT/ARCHIVE commands [CommandMethod("ETNotificationsEnd")] public static void ETNotificationsEnd() { // Remove the handlers g_tro.cancelSubscriptionToAddFileNotification(g_fileHandler); g_tro.cancelDatabaseNotification(g_dbHandler); g_tro.cancelSheetSetNotification(g_ssmHandler); } 相关参考 |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 12:49
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.