Message 1 of 4
Place Family Instance
Not applicable
08-02-2011
08:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey Guys,
I have a GUI button that when pressed should prompt the user to create specific family instances (walls in this case). However, I am having issues with the PromptForFamilyInstancePlacement. I can't create the 'FamilySymbol' object for OST_Walls.
When I try debug through the SDK example, and this discussion on The Building coder
(http://thebuildingcoder.typepad.com/blog/2010/06/place-family-instance.html) then the 'symbol' object is always null and an exception is thrown.
I'm stuck!!! Any help appreciated!
Thanks guys
uidoc.PromptForFamilyInstancePlacement( symbol );
FilteredElementCollector collector = new FilteredElementCollector( doc ); collector.OfCategory( BuiltInCategory.OST_Doors ); collector.OfClass( typeof( FamilySymbol ) ); FamilySymbol symbol = collector.FirstElement() as FamilySymbol; uidoc.PromptForFamilyInstancePlacement( symbol );
