Want to Vault a File

You want to save a CAD Document with an attached Native File.

Technique

You will need to use the setFileProperty call which handles creating a file and sets the associated value on the specified property.

Client-side methods use selectFile()that gets a File object based on user selection:

Javascript

var vlt = top.aras.vault;
vlt.selectFile().then(function (fileObject)
{
var d = aras.IomInnovator.newItem(“CAD”, “add”);
d.setProperty(“item_number”, “007");
d.setFileProperty(“native_file”, fileObject);
d.apply();
});

Server-side methods require a string for the physical path to the file. The file must be on the server machine.

C#

Item d = this.newItem(“CAD”, “add”);
d.setProperty(“item_number”, “007");
d.setFileProperty(“native_file”, @"C:\myFile.txt”);
return d.apply();