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
Solved! Go to Solution.
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.
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..
Can't find what you're looking for? Ask the community or share your knowledge.