AnsweredAssumed Answered

How remove user-defined reference between 2 files by code

Question asked by Julien Maulbault on Apr 28, 2016
Latest reply on May 2, 2016 by Julien Maulbault

How can I remove user-defined reference between 2 files by code ?

I know only how to add one reference, this way.

 

private void AddReferences(int iFileID, List<string> iReferenceFile)
  {
  var addCustRefs = (IEdmAddCustomRefs2)_Vault2.CreateUtility(EdmUtility.EdmUtil_AddCustomRefs);
  var quantityArray = Enumerable.Repeat(1, iReferenceFile.Count()).ToArray();
  var iReferenceFileArray = iReferenceFile.Select(x => _Vault2.RootFolderPath + "\\" + x).ToArray();

  addCustRefs.AddReferencesPath2(iFileID, ref iReferenceFileArray, ref quantityArray);
  addCustRefs.CreateTree((int)EdmCreateReferenceFlags.Ecrf_Nothing);
  var CreateReferencesResult = addCustRefs.CreateReferences();
  }

Outcomes