CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

AddFileNotificationHandler Method (ActiveX/ATO)

2023-1-1 23:05| 发布者: admin| 查看: 180| 评论: 0|来自: AutoCAD

摘要: 将新文件添加到传递集时触发。

将新文件添加到传递集时触发。

支持的平台:仅窗口

Namespace:传输利布

组装:acETransmit20.tlb

签名

VB.NET:

Friend Class custom_class_name
    Implements TransmittalAddFileNotificationHandler

    Public Sub addFileNotificationHandler(pFile, pTransmit) _
        Implements TRANSMITTALLib.ITransmittalAddFileNotificationHandler.addFileNotificationHandler
        ...
    End Sub

End Class

C#:

internal class custom_class_name : TransmittalAddFileNotificationHandler
{
    public void addFileNotificationHandler(pFile, pTransmit)
    {
        ...
    }
}
custom_class_name

自定义类的名称。

p文件

访问:仅输入

类型:传递文件对象

指向将图形或文件添加到传递集时创建的对象的指针。TransmittalFile

p传输

访问:仅输入

类型:传递操作对象

指向表示要在其中添加图形或文件的传递集的对象。TransmittalOperation

返回值(RetVal)

无返回值。

言论

没有额外的评论。

发布信息

释放:AutoCAD 2004 及更高版本

例子

VB.NET:

' Custom class used to monitor files being added to the transmittal package
Friend Class MyTransFileNotifier
    Implements TransmittalAddFileNotificationHandler

    ' Used to get a notification when a drawing or file is added to the transmittal package
    Public Sub addFileNotificationHandler(pFile As TRANSMITTALLib.TransmittalFile, _
                                          pTransmit As TRANSMITTALLib.TransmittalOperation) _
            Implements TRANSMITTALLib. _
               ITransmittalAddFileNotificationHandler.addFileNotificationHandler
        Application.DocumentManager.MdiActiveDocument.Editor. _
            WriteMessage(Environment.NewLine & _
                         "File added to transmittal package: " & pFile.sourcePath)
    End Sub
End Class

C#:

// Custom class used to monitor files being added to the transmittal package
internal class MyTransFileNotifier : TransmittalAddFileNotificationHandler
{
    // Used to get a notification when a drawing or file is added to the transmittal package
    public void addFileNotificationHandler(TRANSMITTALLib.TransmittalFile pFile, 
                                           TRANSMITTALLib.TransmittalOperation pTransmit)
    {
        Application.DocumentManager.MdiActiveDocument.Editor.
            WriteMessage(Environment.NewLine + "File added to transmittal package: " +
                         pFile.sourcePath);
    }
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-27 15:18

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部