writeadf


Purpose

Export functions or shapes to Associated Data File.

Syntax

writeadf('filename',f,g,...)
writeadf('filename',f,'delete')
writeadf('fname.afu',f,'fcn')
writeadf('*.afu',f,'silent','noprogbar')
writeadf('*.afu',f,g,'overwrite',[1 2 4 6])

Description

WRITEADF writes one or more imat_fn or imat_shp variables to anAssociated Data File (ADF). The filename should include the extension, either .afu for a function ADF, .ati for a time history ADF, or .ash for a shape ADF. The variables to be written should be compatible with the desired ADF type. If you pass in the string 'silent', WRITEADF will suppress output. The optional input string 'noprogbar' will suppress the progress bar.

If the specified file exists, then by default the records will be appended to the file. Otherwise, a new file will be created. The optional input string 'delete' will delete the ADF before writing to it, if it exists.

If the 'overwrite' option is used, WRITEADF will overwrite records in the ADF rather than appending them to the end of the ADF. RECIND is a vector of indices into the ADF for which records to overwrite. It must be the same length as the total valid number of records to write, and must contain valid record numbers. To see a list of valid record numbers in the ADF, see column 1 of the ADF header matrix returned by READADF with the 'adfheader' option.

Passing in an optional string argument 'fcn' along with a FCN causes WRITEADF to write out the ADF in the format introduced in Siemens NX12, which writes the 128-character function name to an extended character header block. Please note that this format of ADF is NOT compatible with earlier versions of NX or any version of I-deas or any other third party software that supports ADFs.

If the filename has wildcards, or no filename argument is provided, then a standard file dialog will be presented to allow the user to choose the file to write. Note that if you choose an existing ADF from the file dialog, you will get a warning that the file will be replaced. Please ignore this message, as it is hard-wired into the MATLAB file dialog.

Examples

>> writeadf('/users/testdata/run01_updated.afu', f);
>> writeadf('file.afu', f, 'overwrite', [1 4]);
>> writeadf('*.ash', s);

See Also

readadf, getunits, setunits