AddFile メソッド(ActiveX/ATO)

転送セットに図面以外のファイルを追加します。

サポートされているプラットフォーム: Windows のみ

名前空間: TRANSMITTALLib

アセンブリ: acETransmit20.tlb

構文と要素

VB.NET:

RetVal = object.addFile(bstrFullPath, pIParentFile, bAddedBy3rdParty, ppIAddedFile)

C#:

RetVal = object.addFile(bstrFullPath, pIParentFile, bAddedBy3rdParty, out ppIAddedFile);
object

タイプ: TransmittalOperation オブジェクト

このメソッドが適用されるオブジェクト。

fullpathname

アクセス: 入力のみ

タイプ: 文字列

転送セットに追加するファイルのパスと名前。

pIParentFile

アクセス: 入力のみ

タイプ: TransmittalFile オブジェクト

転送セットに追加されているファイルの親ファイルまたはホスト ファイルを表す TransmittalFile オブジェクト。

bAddedBy3rdParty

アクセス: 入力のみ

タイプ: 長整数型

  • 0 (False): ファイルは、サードパーティのアプリケーションによって追加されていると識別されません。
  • 1 (True): ファイルは、サードパーティのアプリケーションによって追加されていると識別されます。
ppIAddedFile

アクセス: 出力のみ

タイプ: TransmittalFile オブジェクト

転送セットに追加された図面ファイルを表す TransmittalFile オブジェクト。

戻り値(RetVal)

タイプ: AddFileReturnVal 列挙型

図面ファイルが転送セットに正常に追加されたかどうかを表す定数値。

注意

追加の注意はありません。

リリース情報

リリース: 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();
}