Hi dears.
I have a problem with remove nwd files from nwf using api functions.
I try to use this function:
Autodesk.Navisworks.Api.Controls.DocumentControl doccontrol = new DocumentControl();
Document doc;
doc = doccontrol.Document;
doc.TryOpenFile("filename")
Model item = doc.Models.First;
doc.Models.InternalRemove(item);
Error message:
System.NotSupportedException: Use Document.RemoveFile
в Autodesk.Navisworks.Api.DocumentParts.DocumentModels.InternalRemove(Model item)
But i'm not find this function. May be there is Com function?
And second problem. Most importantly.
If my nwf file contains a clash test then after the save clash test is disappears.
(doccontrol.Document.TrySaveFile("filename",DocumentFileVersion.Navisworks2012))
How to save document with clash tests?
Thank you! Regards! Evgeny Fedorov.
ps. I know about restriction of clash when using api function. But maybe there is a way out of the situation.
Hi,
sounds like you the blog below could help you:
http://adndevblog.typepad.com/aec/2013/01/delete-or-remove-an-appended-model.html
As to clash test, do you mean the clash test info will disappear if saving by API? Does this occur with a plugin or a control based app?