Possible to retrieve instance driven filled region area parameter from family?

Possible to retrieve instance driven filled region area parameter from family?

glenncai
Enthusiast Enthusiast
471 Views
2 Replies
Message 1 of 3

Possible to retrieve instance driven filled region area parameter from family?

glenncai
Enthusiast
Enthusiast

Hi,

I'm working on a experiment to get the filled region area parameter value from a detail item family instance. I can get the parameter value by using FilteredElementCollector(Family Document). But this value is only belong to the default filled region size inside the family document. I'm wondering if is possible to retrieve the value from the project document where the region area is driven by the instance parameter inputs in the project. My goal is to retrieve the the area parameter value without writing a formula, so I can easier to handle more complex shapes.  Thank you!

In Family Editor:                                   

filledRegion_1.png

In Project:

filledRegion_2.png

0 Likes
472 Views
2 Replies
Replies (2)
Message 2 of 3

bhprest
Advocate
Advocate

I'm also curious if there is an efficient way to do this. Hopefully someone more experienced has a better method.

 

The only way that I know how to do this is as follows:

  1. In your project document, collect the instance parameter values that control the filled region in question for every instance that you need to record and save them.
  2. Using the Document.EditFamily() method, open the family document
  3. Start a temporary transaction within the family document
  4. Using the FamilyManager in the family document, set the instance values of the parameters saved from above.
  5. Using the known ElementId or UniqueId of the filled region in question, find and save the area value of  the filled region.
  6. Repeat steps 4 and 5 for each instance you need the area of. 
  7. RollBack the temporary transaction.
Message 3 of 3

Anonymous
Not applicable

Thanks for reply. Your suggestion works. The script run slower with this work around but good enough to get my result. Thank you!  

0 Likes