About Adding Files to a Transmittal Set (ActiveX/ATO)

Drawing and other files related to a project can be added to a transmittal set.

Drawing (DWG) files stored on a local or network drive can be added to a transmittal set. The addDrawingFile() method of a TransmittalOperation object is used to add a drawing file to a transmittal set. When a drawing file is added to a transmittal set, the Transmittal engine steps through the drawing file to identify which files are referenced by the drawing. Each referenced file is added to the transmittal set. The paths used to locate referenced files come from the drawing which they are referenced and the TransmittalInfo object of the transmittal set.

The following shows how to add a drawing file to a transmittal set:

VB.NET
' Defines the file to add to the transmittal set
Dim tf As TransmittalFile = Nothing
Dim dwgFile As String = "C:\Architectural\A-01.dwg"

' Adds the drawing file to the transmittal set
tro.addDrawingFile(dwgFile, tf)
C#
// Defines the file to add to the transmittal set
TransmittalFile tf = null;
string dwgFile = "C:\\Architectural\\A-01.dwg";

// Adds the drawing file to the transmittal set
tro.addDrawingFile(dwgFile, out tf);
VBA
' Defines the file to add to the transmittal set
Dim tf As TransmittalFile
Dim dwgFile As String
dwgFile = "C:\Architectural\A-01.dwg"

' Adds the drawing file to the transmittal set
tro.addDrawingFile dwgFile, tf

Add Drawing Files from Sheet Sets

In addition to adding individual drawing files to a transmittal set, the drawing files referenced by a sheet set (DST) file can be added to a transmittal set with the archiveSheetSet(), addSheets(), and addSheetSelSet() methods of the TransmittalOperation object. When working with DST files, you must reference the Sheet Set Manager API stored in the acsmcomponents<version>.tlb file.

Note: Replace <version> with the version number of the Sheet Set Manager API used by the target AutoCAD release.
VB.NET
' Add a sheet set and the drawings files it references to a transmittal set
' Gets a new instance of the Sheet Set Manager object
Dim sheetSetManager As IAcSmSheetSetMgr = New AcSmSheetSetMgr
Dim sheetSetFile as String = "C:\Architectural\Project.dst"

' Opens a sheet set (DST) file in memory
Dim sheetSetDatabase As AcSmDatabase = _
    sheetSetManager.OpenDatabase(sheetSetFile, False)

' Gets the sheet set from the database and processes it
tro.archiveSheetSet(sheetSetDatabase.GetSheetSet(), vbTrue)

' Closes the sheet set
sheetSetManager.Close(sheetSetDatabase)
C#
// Add a sheet set and the drawings files it references to a transmittal set
// Gets a new instance of the Sheet Set Manager object
IAcSmSheetSetMgr sheetSetManagerSS = new AcSmSheetSetMgr();
string sheetSetFile = "C:\\Architectural\\Project.dst";

// Opens a sheet set (DST) file in memory
AcSmDatabase sheetSetDatabaseSS = sheetSetManagerSS.OpenDatabase(sheetSetFile, false);

// Gets the sheet set from the database and processes it
tro.archiveSheetSet(sheetSetDatabaseSS.GetSheetSet(), 1);

// Closes the sheet set
sheetSetManagerSS.Close(sheetSetDatabaseSS);
VBA
' Add a sheet set and the drawings files it references to a transmittal set
' Gets a new instance of the Sheet Set Manager object
Dim sheetSetManager As New IAcSmSheetSetMgr
Dim sheetSetFile as String
sheetSetFile = "C:\Architectural\Project.dst"

' Opens a sheet set (DST) file in memory
Dim sheetSetDatabase As AcSmDatabase
Set sheetSetDatabase = sheetSetManager.OpenDatabase sheetSetFile, False

' Gets the sheet set from the database and processes it
tro.archiveSheetSet sheetSetDatabase.GetSheetSet, vbTrue

' Closes the sheet set
sheetSetManager.Close sheetSetDatabase

Add Other Files

Files other than drawings and those referenced by a drawing file can be added to a transmittal set. For example, you could add a spreadsheet that contains a list of standard layers used in your drawings and their purpose, or even a word processor document that contains general project notes. The addFile() method of the TransmittalOperation object is used to add a file to a transmittal set.

VB.NET
' Gets a reference to the transmittal set's file graph and its root node
Dim tfg As TransmittalFilesGraph = tro.graphInterfacePtr()
Dim rootTF As TransmittalFile = tfg.getRoot()

' Defines the file to add to the transmittal set
Dim tf As TransmittalFile = Nothing
Dim file As String = "C:\Standards\layer_list.xls"

' Adds the file to the transmittal set
tro.addFile(file, rootTF, vbFalse, tf)
C#
// Gets a reference to the transmittal set's file graph and its root node
TransmittalFilesGraph tfg = tro.graphInterfacePtr();
TransmittalFile rootTF = tfg.getRoot();

// Defines the file to add to the transmittal set
TransmittalFile tf = null;
string file = "C:\\Standards\\layer_list.xls";

// Adds the file to the transmittal set
tro.addFile(file, rootTF, false, out tf);
VBA
' Gets a reference to the transmittal set's file graph and its root node
Dim tfg As TransmittalFilesGraph
Set tfg = tro.graphInterfacePtr

Dim rootTF As TransmittalFile
Set rootTF = tfg.getRoot

' Defines the file to add to the transmittal set
Dim tf As TransmittalFile
Dim file As String
file = "C:\Standards\layer_list.xls"

' Adds the file to the transmittal set
tro.addFile file, rootTF, vbFalse, tf