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

Re: Select all rebar

$
0
0

Hi Dennis,

It should be. I'm just going to quasi-code this as I'm not near VS right now.

To get the rebar?

 

'get element to copy rebar from
dim elementToCopyRebarFrom as element

'get the built in category of the rebar
dim bic as builtincategory = builtincategory.ost_rebar

dim rebarColl as ienumerable (of familyinstance) = _
new filteredelementcollector(doc).whereelementisnotelementtype.ofclass( _
gettype(familyinstance)).ofcategory(bic).cast(of familyinstance).where( _
function (fi) fi.host.id.integervalue.equals(elementToCopyRebarFrom.id.integervalue) 'you could even limit the overhead on the filteredelementcollector by using a
'bounding box filter as well.

 

 

After that, it's down to can you copy and re-host the rebar to your other beam, or do you have to recreate it?

This bit is beyond my experience, but happily the SDK has a lot of examples of rebar creation. See the Reinforcement,

RebarContainerAnyShapeType, PathReinforcement, NewRebar, NewPathReinforcement, MultiPlanarRebar, etc etc projects.

 

Have a run at it and come back with specific questions if you have them.

 

Let us know how you get on.

 

-Matt


Viewing all articles
Browse latest Browse all 66666

Trending Articles



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