CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

ArchiveSheetSet Method (ActiveX/ATO)

2023-1-1 22:58| 发布者: admin| 查看: 177| 评论: 0|来自: AutoCAD

摘要: 将图纸集 (DST) 文件中的文件添加到传递集。

将图纸集 (DST) 文件中的文件添加到传递集。

支持的平台:仅窗口

Namespace:传输利布

组装:acETransmit20.tlb

签名

VB.NET:

RetVal = object.archiveSheetSet(pISheetSet, includeSSFiles)

C#:

RetVal = object.archiveSheetSet(pISheetSet, includeSSFiles);
对象

类型:传递操作对象

此方法适用的对象。

pI希特集

访问:仅输入

类型: AcSmSheetSet

对象在库中定义。AcSmSheetSetAcSmComponents

包括SSFiles

访问:仅输入

类型:

  • 0 (): 不包括 DST 文件引用的图纸集 (DST) 和支持文件False
  • 1 (): 包括图纸集 (DST) 和 DST 文件引用的支持文件True

返回值(RetVal)

类型:未知/对象

言论

没有额外的评论。

发布信息

释放:AutoCAD 2005 及更高版本

例子

VB.NET:

' Custom command to create a transmittal package from a sheet set
<CommandMethod("eTransmitDSTFile")> _
Public Shared Sub eTransmitDSTFile()

    ' Create a transmittal operation
    Dim tro As TransmittalOperation = New TransmittalOperation()

    ' Setup the transmittal behavior
    Dim ti As TransmittalInfo = _
        TransInfo(tro.getTransmittalInfoInterface(), "C:\Users\Public\TransmittalAPITest\")

    ' Add a file notification handler
    Dim fileHandler As New MyTransFileNotifier
    tro.subscribeToAddFileNotification(fileHandler)

    ' Setup the progress meter for use with sheet selection sets, _
    ' sheet sets, and the creation of a transmittal package
    Dim pmHandler As New MyProgressHandler
    tro.setProgressMeter(pmHandler, 1)

    ' Add a sheet set and the drawings referenced in it
    ' Get a reference to the Sheet Set Manager object
    Dim sheetSetManager As IAcSmSheetSetMgr = New AcSmSheetSetMgr

    ' Open a sheet set (DST) file
    Dim sheetSetDatabase As AcSmDatabase = _
        sheetSetManager.OpenDatabase("C:\AutoCAD\Sample\Sheet Sets\Architectural\IRD Addition.dst", False)

    ' Get the sheet set from the database and process it
    ' 0 - Do not include DST file or support files referenced
    '     by the DST file (templates, blocks, ...)
    ' 1 - Include DST file, all files referenced by the DST file, 
    '     its(sheets And references)
    tro.archiveSheetSet(sheetSetDatabase.GetSheetSet(), vbTrue)

    ' Close the sheet set
    sheetSetManager.Close(sheetSetDatabase)

    ' Remove the file notification handler
    tro.cancelSubscriptionToAddFileNotification(fileHandler)

    ' Remove the progress meter handler
    pmHandler = Nothing

    ' Create the transmittal package
    ' Files are copied and resaved to the path specified by the destinationRoot property
    ' and the other settings of the TransmittalInfo object.
    tro.createTransmittalPackage()
End Sub

C#:

// Custom command to create a transmittal package from a sheet set
[CommandMethod("eTransmitDSTFile")]
public static void eTransmitDSTFile()
{
    // Create a transmittal operation
    TransmittalOperation tro = new TransmittalOperation();

    // Setup the transmittal behavior
    TransmittalInfo ti =
        TransInfo(tro.getTransmittalInfoInterface(), "C:\\Users\\Public\\TransmittalAPITest\\");

    // Add a file notification handler
    MyTransFileNotifier fileHandler = new MyTransFileNotifier();
    tro.subscribeToAddFileNotification(fileHandler);

    // Setup the progress meter for use with sheet selection sets, _
    // sheet sets, and the creation of a transmittal package
    MyProgressHandler pmHandler = new MyProgressHandler();
    tro.setProgressMeter(pmHandler, 1);

    // Add a sheet set and the drawings referenced in it
    // Get a reference to the Sheet Set Manager object
    IAcSmSheetSetMgr sheetSetManager = new AcSmSheetSetMgr();

    // Open a sheet set (DST) file
    AcSmDatabase sheetSetDatabase =
        sheetSetManager.OpenDatabase("C:\\AutoCAD\\Sample\\Sheet Sets\\Architectural\\IRD Addition.dst", false);

    // Get the sheet set from the database and process it
    // 0 - Do not include DST file or support files referenced
    //     by the DST file (templates, blocks, ...)
    // 1 - Include DST file, all files referenced by the DST file, 
    //     its(sheets And references)
    tro.archiveSheetSet(sheetSetDatabase.GetSheetSet(), 1);

    // Close the sheet set
    sheetSetManager.Close(sheetSetDatabase);

    // Remove the file notification handler
    tro.cancelSubscriptionToAddFileNotification(fileHandler);

    // Remove the progress meter handler
    pmHandler = null;

    // Create the transmittal package
    // Files are copied and resaved to the path specified by the destinationRoot property
    // and the other settings of the TransmittalInfo object.
    tro.createTransmittalPackage();
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 12:18

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部