How i can download an assembly .iam file and all its parts to my workspace without changing any version or revision with vault 2013 API.
thanks.
You can use Inventor API to get all part files in an assembly.
Once you get the full file name for assembly and part files, use web service Vault API (DownloadFile or DownloadFilePart) to download files from Vault.
If you install vault SDK from C:\Program Files\Autodesk\ADMS Professional 2013\SDK folder, you can see sample program how to download files from vault (VaultMirror.sln).
Regards,
Suryanto
You want to get an assembly and all of his child relationships with Vault API ?
With this snippet you get all dependent files:
FileAssoc[] fileAssocs = _wsm.DocumentService.GetLatestFileAssociationsByMasterIds( new long[] { _parentFile.MasterId }, // masterId of parent (your top assembly file) FileAssociationTypeEnum.None, // no parent associations false, // no parent recurse FileAssociationTypeEnum.Dependency, // dependent child assosciations true, // child recurse false, // don't include related documents (drawings) false, // don't include hidden files true).First().FileAssocs; // latest version in released state
Inside of fileAssocs you can get the child files (File object) from field CldFile.
But all the information are also available inside of Vault API Reference Help file.
I highly recommend using the "GetFileAssociationLitesByIds" method instead of "GetLatestFileAssociationsByMasterIds". The latter has serious performance issues when working with iParts or iAssemblies and will likely be deprecated in a future release.
Ideally, you would use the VDF to download the files (which uses the former method above).
-Dave
Hey,
may i have a example code for checkout a assembly with all parts
with the method "GetFileAssociationLitesByIds"
thx
Mario