Geometry returns no reference for familyinstance

Geometry returns no reference for familyinstance

Anonymous
Not applicable
9,785 Views
21 Replies
Message 1 of 22

Geometry returns no reference for familyinstance

Anonymous
Not applicable

Hi,

Using 'thebuildingcoder' blog I am trying to create some dimensions between familyinstances (Generic Model face based) but I am having no luck. For the selected familyinstances (generic model face based) no references are returned. But when I select a structural column (familyinstance) the code will return a reference.

I have converted the sample from C# to VB.NET.
Code in C#

 

_opt = new Options();

_opt.ComputeReferences = true;

_opt.IncludeNonVisibleObjects = true;

 


static Reference GetFamilyInstancePointReference(
FamilyInstance fi )
{
return fi.get_Geometry( _opt )
.OfType<Point>()
.Select<Point, Reference>( x => x.Reference )
.FirstOrDefault();
}

Code in VB.NET

 

Dim _opt As Options = Nothing

_opt = New Options()

_opt.ComputeReferences = True

_opt.IncludeNonVisibleObjects = True


Shared Function GetFamilyInstancePointReference(ByVal fi As FamilyInstance) As Reference
Return fi.Geometry(_opt).OfType(Of Point)() _
.Select(Function(x) x.Reference) _
.FirstOrDefault()
End Function

Using RevitLookup (Snoop) I can not seem to find 'point' in the geometry element collection (only GeometryInstance is show). However when I snoop a familyinstance of a structural column 'point' will show up and the code is able to return references. Am I doing something wrong of is this not possible for Generic model facebased instances? I am using Revit 2015.

regards,
Raymond

0 Likes
Accepted solutions (2)
9,786 Views
21 Replies
Replies (21)
Message 21 of 22

desdinova
Advocate
Advocate

Hello friends

Thank you Scott for great stuff.

I try to get references from structural column but I get "No Symbol Geometry found" error.

I can get references from window family.

Is it possible to get references from structural columns.

Thank again.

0 Likes
Message 22 of 22

desdinova
Advocate
Advocate

Hi scott

Thank you for great stuff.

But i select the columns in the wall i cant get references

How can i solve this?

Thanks in advance..

 

http://screencast.com/t/YePS33ty4

0 Likes