ExportToPAT Method


Fill Pattern Export To PAT Method

Export a list of FillPatterns to an AutoCAD PAT file.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool ExportToPAT(
	IList<FillPattern> fillPatterns,
	string filename
)

Parameters

fillPatterns IList FillPattern
A list of FillPatterns to export.
filename String
The full path of the file to export to.

Return Value

Boolean
True if all patterns were exported successfully, False if export of any pattern failed.
Exceptions
Exception Condition
ArgumentException filename is an empty string. -or- fillPatterns is empty. -or- fillPatterns contains the solid fill pattern.
ArgumentNullException A non-optional argument was null
FileArgumentAlreadyExistsException filename is pointing to a folder that already exists and cannot be deleted.
InvalidPathArgumentException The destination file name includes one or more invalid characters.
Remarks

The built-in Solid Fill pattern cannot be expressed in this format.

The PAT file format is ASCII based. FillPatterns with names that contain non-ASCII characters will be exported as 'Pattern_###'. The original name is exported in the description field of the PAT format, encoded as UTF-8.

See Also