AnsweredAssumed Answered

Why does using the API to add files to the vault pulls multiple serial numbers? (C#)

Question asked by Yuval Karoly on Jan 24, 2020
ModelDoc2 topAssembly = swApp.ActiveDoc;

EdmVault5 vault = new EdmVault5();
if (!vault.IsLoggedIn) vault.LoginAuto("Sandbox_Vault", 0);

PackAndGo packNGo = topAssembly.Extension.GetPackAndGo();
packNGo.IncludeDrawings = true;

IEdmFolder5 CADFolder = vault.RootFolder.AddFolder(0, "CAD");

object partPathList, docStatusList;
bool status = packNGo.GetDocumentSaveToNames(out partPathList, out docStatusList);

foreach (string path in partPathList as string[]) CADFolder.AddFile(0, path);


Above is the process my code runs through to add files to the vault.


This works just fine. However, every added file now has a different serial number for each configuration (including the "@" and "default" configurations) (see below).

(EDIT: Turns out any time I copy files into the vault multiple serial numbers are pulled)


When I create a new file directly in the vault (right click > new > Assembly), it's set up to have every configuration automatically share one serial number (see below).

Why is it different in this scenario?

Not sure if this is a problem with settings or something that needs to be changed in my code. Any way to have these added files mimic regular ones and share one serial number across all configurations?