AddFile Method (ActiveX/ATO)

Adds a non-drawing file to the transmittal set.

Supported platforms: Windows only

Namespace: TRANSMITTALLib

Assembly: AcETransmit19.tlb

Signature

VB.NET:

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

C#:

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

Type: TransmittalOperation object

The object this method applies to.

fullpathname

Access: Input-only

Type: String

Path and name of the file to add to the transmittal set.

pIParentFile

Access: Input-only

Type: TransmittalFile object

TransmittalFile object that represents the parent or host file of the file being added to the transmittal set.

bAddedBy3rdParty

Access: Input-only

Type: Long

  • 0 (False): File is not identified as being added by a third-party application.
  • 1 ( True): File is identified as being added by a third-party application.
ppIAddedFile

Access: Output-only

Type: TransmittalFile object

TransmittalFile object that represents the drawing file added to the transmittal set.

Return Value (RetVal)

Type: AddFileReturnVal enum

Constant value that represents whether the drawing file was successfully added to the transmittal set.

Remarks

No additional remarks.

Release Information

Releases: AutoCAD 2004 and later

Examples

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();
}