Issue
Is it posible to delete or remove an appended model? I cant find any obvious was through the .NET api.
Solution
Suppose we have one document in which there is only one modal from one file. We can run Append or Merge to add more files. So we would have “several files” in one document.Currently, only COM API provides the ability to remove the models. It can delete any files like you select the files in UI and press delete. The whole contents of the deleted file will be removed. The code is as below, assume we want to delete the 3rd file in the document.
public override int Execute(params string[] parameters)
{
Nw.Document doc =
Nw.Application.ActiveDocument;
doc.CurrentSelection.CopyFrom(doc.Models[2].
RootItem.AncestorsAndSelf);
ComApi.InwOpState10 state =
ComApiBridge.ComApiBridge.State;
state.DeleteSelectedFiles();
return 0;
}