AddFile 方法 (ActiveX/ATO) 
将非图形文件添加到传递集。 支持的平台:仅限 Windows 命名空间:传输塔利布 程序集: acETransmit20.tlb 签名VB.NET: RetVal = object.addFile(bstrFullPath, pIParentFile, bAddedBy3rdParty, ppIAddedFile) C#: RetVal = object.addFile(bstrFullPath, pIParentFile, bAddedBy3rdParty, out ppIAddedFile); 
 言论没有其他评论。 发行信息释放:AutoCAD 2004 及更高版本 历史
 例子VB.NET: ' Custom command to create a transmittal package with a non-drawing file
<CommandMethod("eTransmitNonDWGFile")> _
Public Shared Sub eTransmitNonDWGFile()
    ' 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 non-drawing file
    Dim tf As TransmittalFile = Nothing
    tro.addFile("C:\AutoCAD\Sample\Mechanical Sample\mass-balance.xls", Nothing, 0, tf)
    ' 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 with a non-drawing file
[CommandMethod("eTransmitNonDWGFile")]
public static void eTransmitNonDWGFile()
{
    // Create a transmittal operation
    TransmittalOperation tro = new TransmittalOperation();
    // Setup the transmittal behavior
    TransmittalInfo ti =
        TransInfo(tro.getTransmittalInfoInterface(), "C:\\Users\\Public\\TransmittalAPITest\\");
    // Add a non-drawing file
    TransmittalFile tf = null;
    tro.addFile("C:\\AutoCAD\\Sample\\Mechanical Sample\\mass-balance.xls", null, 0, out tf);
    // 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();
}
 
相关参考 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 23:37
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.