« Creating a Slanted Column | Main | Auto-Confirm Save Using DialogBoxShowing Event »

June 11, 2009

Comments

1. And if I want to Delete Family along with all Family Types in it. How can I do that?
2. How can I List all families in One Collection Including All Ducts and Pipes also?
Many thanks.
Yasir

Dear Yasir,

1. You can use the Document.Delete method. Its use in this context is described in

http://thebuildingcoder.typepad.com/blog/2009/06/unload-family-type.html

2. That sounds like a pretty weird request to me, but it is still doable:

List.lt.ElementFilter.gt. a
= new List.lt.ElementFilter.gt.( 3 );

a.Add( new ElementClassFilter(
typeof( Family ) ) );

a.Add( new ElementClassFilter(
typeof( Duct ) ) );

a.Add( new ElementClassFilter(
typeof( Pipe ) ) );

FilteredElementCollector collector
= new FilteredElementCollector( doc )
.WherePasses( new LogicalOrFilter( a ) );

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource