Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Re: How to filter RebarBarType + rebarStyle.Stirrup

$
0
0

Dear Sudhan,

 

Examine the detailed properties of the element you are trying to retrieve through the filter, e.g., using RevitLookup.

 

Make sure you know what class of element you are looking for.

 

From you code, it looks as if you are trying to retrieve a RebarBarType element with a specific style.

 

They style is presumably accessible via some property or other, maybe hidden away in a parameter value.

 

Using LINQ, the resulting code might look something like this:

 

FilteredElementCollector a
  = new FilteredElementCollector( doc )
    .OfClass( typeof( RebarBarType ) )
    .Cast<RebarBarType>()
    .Where<RebarBarType>( e
      => element e fulfils your detailed search requirements );

 

Cheers,

 

Jeremy


Viewing all articles
Browse latest Browse all 67020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>