Check if the dimension is to a reference plane inside a family document

Check if the dimension is to a reference plane inside a family document

Anonymous
Not applicable
682 Views
2 Replies
Message 1 of 3

Check if the dimension is to a reference plane inside a family document

Anonymous
Not applicable

How can I know if i collect all the dimensions in a family document, that their referenced to a reference plane or level?

 

0 Likes
Accepted solutions (2)
683 Views
2 Replies
Replies (2)
Message 2 of 3

FAIR59
Advisor
Advisor
Accepted solution

You can check each reference in the dimension.References property.

A reference has a property ElementId, which you can use to get the referenced Element and determine if it's a Level or a Reference Plane.

 

Dimension dim;
foreach (Reference r in dim.References)
{
	Element e = doc.GetElement(r.ElementId);
	if ( e is ReferencePlane) 
	{
		TaskDialog.Show("result", "dimension has reference to Referenceplane "+ e.Name);
		break;
	}
}
Message 3 of 3

Anonymous
Not applicable
Accepted solution

Right on

0 Likes