I would like to limit the selection to spicific objects. A portion of the model is transparent and I would like to be able to select objects through the transparent objects. Is that posible? Thanks.
I'd suggest you take a look at Find API of Navisworks. here is one post which you could get started with.
e.g. for your question, one way could be:
Document oDoc = Autodesk.Navisworks.Api.Application.ActiveDocument
; IEnumerable<ModelItem> items = from x in oDoc.Models.RootItem. DescendantsAndSelf where x.HasGeometry && x.Geometry.ActiveTransparency >0 select x; // highlight the items oDoc.CurrentSelection.CopyFrom(items);
I'm not sure I've explained myself clearly. I have a model with several modelItemCollections. Some of the modelItems are have a 95% transparency, the rest no transparency. I want to select on the screen but only be able to pick the non-transparent modelItems. They are part of thier own modelItemCollection. So in the attached image, if the user clicked where the red arrow is, they woukd get the cyan modelItem, even though that modelItem is behind the transparent modelItem denoted with the red boundry. Thanks.
I see. you want to cusmomize the selection when user is selecting. Sorry, in current releases, the picking behavior cannot be customized. Even though you could get OnCurrentSelectionChanged(/Chaning), API does not allow you to change the selection in the events.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.