Hi all
Please, how can i trigger the "Select All" button from my app using c#.
Thanks,
Regards,
SF
Hi,
no API to call any built-in commands. But API provides direct way to select all.
.NET: DocumentCurrentSelection.SelectAll()
COM: State.CurrentSelection.SelectAll()
My SelectAll only selects one object.
How can I select "all" objects in NV?
This line provides nothing of value:
Autodesk.Navisworks.Api.Application.ActiveDocument.CurrentSelection.SelectAll();
This line provides only one object in the list:
MainDoc = Autodesk.Navisworks.Api.Application.MainDocument;
MainDoc.CurrentSelection.SelectAll();
I'm trying to make a list of all objects. maybe there is a better way to do this, but "RootItemDescendantsAndSelf" and "Search API" techniques are terribly slow. The "RootItemDescendantsAndSelf" method keeps cycling back to the original line of code, and loops thru all the geometry even though it has already been assigned to a different array/list. With 100,000's of objects, this is not possible. I'd rather just have a list of all the objects once, and I'll use conditionals to channel the code.