Deleting Single File As well As some particular objects from any file in NW Environment using NW API

Deleting Single File As well As some particular objects from any file in NW Environment using NW API

aishwarya_karande
Alumni Alumni
256 Views
1 Reply
Message 1 of 2

Deleting Single File As well As some particular objects from any file in NW Environment using NW API

aishwarya_karande
Alumni
Alumni

In my project, I'm currently using the public void RemoveFile(int index) functionality of the NW API to delete files in specific cases. However, I've encountered an issue when there is only a single file in the NW environment. In such a scenario, the RemoveFile function doesn't seem to be very helpful, as there is no delete option available on the CAD side for a single NW file.

I am looking for a solution to delete files under certain conditions in my project. Is there an alternative functionality in the NW API that allows the deletion of a single file?

As well as is there also any functionality available to delete a specific object within a file?

0 Likes
257 Views
1 Reply
Reply (1)
Message 2 of 2

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @aishwarya_karande ,

 

Please be aware that the Navisworks API rarely supports functionality that is not also available in the user interface. Therefore, if the UI does not support a particular feature, the API probably won't either. It is always helpful to research the optimal manual approach to a solution first before attempting to address the task programmatically.

Can you achieve what you want through the Navisworks UI without any issues?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes