Table of Contents

Class Selection.LinkSelectionFilter

Namespace
OpenMEPRevit.Document
Assembly
OpenMEPRevit.dll
[IsVisibleInDynamoLibrary(false)]
public class Selection.LinkSelectionFilter : ISelectionFilter
Inheritance
Selection.LinkSelectionFilter
Implements
ISelectionFilter
Inherited Members

Methods

AllowElement(Element?)

Override this pre-filter method to specify if the element should be permitted to be selected.

public bool AllowElement(Element? elem)

Parameters

elem Element

A candidate element in selection operation.

Returns

bool

Return true to allow the user to select this candidate element. Return false to prevent selection of this element.

Remarks

If prompting the user to select an element from a Revit Link instance, the element passed here will be the link instance, not the selected linked element. Access the linked element from Reference passed to the AllowReference() callback of ISelectionFilter.

If an exception is thrown from this method, the element will not be permitted to be selected.

AllowReference(Reference, XYZ)

Override this post-filter method to specify if a reference to a piece of geometry is permitted to be selected.

public bool AllowReference(Reference refer, XYZ pos)

Parameters

refer Reference
pos XYZ

Returns

bool

Return true to allow the user to select this candidate reference. Return false to prevent selection of this candidate.

Remarks

If an exception is thrown from this method, the element will not be permitted to be selected.