Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

remove nwd from nwf. Save nwf with clash tests.

3 REPLIES 3
Reply
Message 1 of 4
Evgueny
547 Views, 3 Replies

remove nwd from nwf. Save nwf with clash tests.

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. M
ost 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.

3 REPLIES 3
Message 2 of 4
xiaodong_liang
in reply to: Evgueny

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? 

Message 3 of 4
Evgueny
in reply to: xiaodong_liang

Hi, Xiaodong Liang.
Yes clash test info will disappear if saving by API occur with a control based app.
Message 4 of 4
xiaodong_liang
in reply to: Evgueny

Hi,

Sorry I was not able to get back. I can reproduce this problem and logged this issue as NW-48310 - Control based app cleans up Clash Test when saving. Sorry for the issue.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report