Hello All,
I am working on an add-in and will utilize this add-in to insert objects into a Revit Document. These objects will be various families such as Duct Fitting Families. I am currently utilizing the DirectShape API to render previews of the object I am creating, let's call these preview objects. My dilemma is that when a preview object is in the and visible on screen, it is selectable by the user. I do not want this as I want to be in the add-in to have complete control of displaying, manipulating and disposing of the preview object.
I see two ways to go about this, I can either disable user input into the project viewports all together or I can somehow toggle whether or not the preview object I am creating can be 'selected'. I would much rather go for the latter as it is more directly what I am looking to do.
Does anyone have any suggestions on disabling an objects ability to be selected by the user?
Thanks!
Hello All,
I am working on an add-in and will utilize this add-in to insert objects into a Revit Document. These objects will be various families such as Duct Fitting Families. I am currently utilizing the DirectShape API to render previews of the object I am creating, let's call these preview objects. My dilemma is that when a preview object is in the and visible on screen, it is selectable by the user. I do not want this as I want to be in the add-in to have complete control of displaying, manipulating and disposing of the preview object.
I see two ways to go about this, I can either disable user input into the project viewports all together or I can somehow toggle whether or not the preview object I am creating can be 'selected'. I would much rather go for the latter as it is more directly what I am looking to do.
Does anyone have any suggestions on disabling an objects ability to be selected by the user?
Thanks!
When your own add-in prompts the user to select elements, you have full control over each element selectability through the ISelectionFilter interface:
https://www.revitapidocs.com/2020/d552f44b-221c-0ecd-d001-41a5099b2f9f.htm
Unfortunately, I am not aware of any similar mechanism for manipulating or controlling Revit's built-in selection process.
When your own add-in prompts the user to select elements, you have full control over each element selectability through the ISelectionFilter interface:
https://www.revitapidocs.com/2020/d552f44b-221c-0ecd-d001-41a5099b2f9f.htm
Unfortunately, I am not aware of any similar mechanism for manipulating or controlling Revit's built-in selection process.
Can't find what you're looking for? Ask the community or share your knowledge.