Class CadTransmittal
eTransmit of a sheet set (A12 D18): gathers what a set needs to be opened somewhere else, one zip of the set's data
file, the drawings of its sheets, the files those drawings reference (external references, images, PDF underlays, the
files of data links), the sheet creation templates and the page setup overrides file, the plot style tables the layouts
of the sheets name, and the font files the text styles name that sit beside the drawings or in the support folders,
with a report, transmittal.txt. It is AutoCAD's Create Transmittal with its Use organized folder structure
and a package of the zip type, and nothing of its other types, setups or paths.
public sealed class CadTransmittal
- Inheritance
-
CadTransmittal
- Inherited Members
Remarks
The folder of the .dst is the root of the zip. A file under it keeps its place: a drawing in
D:\Projects\Tower\Architectural is Architectural\A-101.dwg of the zip, and an external reference
..\Model\Tower model.dwg of it is still where it names. A file outside the root, such as a photograph on another
drive, goes in Files (a second file of that name there is numbered, site-photo (2).jpg). Where a path
would then be wrong, it is written again in the copy and the original is not touched: an absolute path, a path to a file
that has gone to Files, becomes the path relative to the drawing, in the drawings (PathName of an
external reference, the path of an image or a PDF underlay) and in the copy of the .dst (the drawing of each sheet, the
templates, the overrides file), which then names its files by their relative path alone. A path of a data link is not
written again: its file goes in the zip, and a link by a full path is left as it is. A file that is already right is
copied byte for byte; a drawing is read and saved again only where a path or a field in it has to change, and not at all
where the DWG writer would leave something of it out (the report says so).
Plot style tables are looked for by name in the plot style folder given. A table that is not a file there and is one of
the tables OpenCAD2D and AutoCAD make themselves (acad.ctb, monochrome.ctb and so on) is not sent: every
installation has it. Fonts that Windows has or OpenCAD2D carries are not sent either: only a font file a text style
names that is in the folder of the drawing, the folder of the .dst or a support folder given.
Two runs over the same files give the same bytes: the entries are in the order of their paths, each with the time of its file, and the report carries the date of the clock of the sheet set file. A drawing saved again carries the time it was saved at in its own header, so the bytes of such a zip differ from run to run.
Constructors
- CadTransmittal(CadSheetSetFile, string, IEnumerable<string>)
Makes the transmittal of a sheet set.
Properties
- DefaultZipPath
Gets the zip the dialog offers:
Transmittals<set name>.zipin the folder of the .dst, the name with each character a file cannot hold made an underscore.
- Notes
Gets or sets the notes that go in the report, what the box of the dialog holds; empty for none.
- SheetSetFile
Gets the sheet set's file.
- UpdateFields
Gets or sets whether the fields of the drawings are updated in the copies before they are zipped; true until set. A drawing with fields is opened and saved again for it, and each field is evaluated as that drawing's FIELDEVAL asks (bit 8 for eTransmit, and the bits for opening and saving that the program's own open and save use).
Methods
- Gather(IEnumerable<CadSheetComponent>)
Lists the files the sheets under a selection need, the .dst and the set's templates and overrides file among them. A drawing is read once, however often a list is asked for. A sheet with no layout sends nothing; a sheet whose drawing is not found is listed by that drawing's path, not found.
- Report(IReadOnlyList<CadTransmittalFile>, string)
Makes the report as it would be written now: the sheet set, the package, the notes, the sheets, the files that go, those left out and those not found, and the paths that are to be written again. The fields updated are not known until the zip is written.
- Write(IReadOnlyList<CadTransmittalFile>, string)
Writes the zip: each file that is ticked, in the order of its path in the zip, then
transmittal.txt. A file in the folder of the .dst keeps its place and one outside it goes inFiles; the .dst, the drawings and the paths in them are written again as the class says, and the fields of the drawings are updated first where UpdateFields is on. The zip is written beside its name first and put in its place once written, replacing a zip that is there; its folder is made where it is not.