Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Geometry returns no reference for familyinstance

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
Anonymous
7869 Views, 21 Replies

Geometry returns no reference for familyinstance

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

21 REPLIES 21
Message 21 of 22
desdinova
in reply to: Anonymous

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.

Message 22 of 22
desdinova
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community