Error in sending a Curve based column in Revit connector

Error

   at Objects.Converter.Revit.ConverterRevit.TryGetLocationAsCurve(FamilyInstance familyInstance)
   at Objects.Converter.Revit.ConverterRevit.ColumnToSpeckle(FamilyInstance revitColumn)
   at Objects.Converter.Revit.ConverterRevit.ConvertToSpeckle(Object object)
   at Speckle.ConnectorRevit.UI.ConnectorBindingsRevit.<SendStream>d__9.MoveNext() 

So this issue is particularly for columns that are curve-based instead of point-based.

 private Base TryGetLocationAsCurve(FamilyInstance familyInstance)
	 {
	 if (familyInstance.CanHaveAnalyticalModel())
	 {
	 //no need to apply offset transform
	 var analyticalModel = familyInstance.GetAnalyticalModel();
	 if (analyticalModel != null && analyticalModel.GetCurve() != null)
	 {
	 return CurveToSpeckle(analyticalModel.GetCurve()) as Base;
	 }
	 }
	 var point = PointToSpeckle((familyInstance.Location as LocationPoint).Point);
	 try
	 {
	 //apply offset transform and create line
	 var baseOffset = GetParamValue<double>(familyInstance, BuiltInParameter.FAMILY_BASE_LEVEL_OFFSET_PARAM);
	 var baseLevel = ConvertAndCacheLevel(familyInstance, BuiltInParameter.FAMILY_BASE_LEVEL_PARAM);
	 var topOffset = GetParamValue<double>(familyInstance, BuiltInParameter.FAMILY_TOP_LEVEL_OFFSET_PARAM);
	 var topLevel = ConvertAndCacheLevel(familyInstance, BuiltInParameter.FAMILY_TOP_LEVEL_PARAM);
	 
	 var baseLine = new Line(new[] { point.x, point.y, baseLevel.elevation + baseOffset, point.x, point.y, topLevel.elevation + topOffset }, ModelUnits);
	 baseLine.length = Math.Abs(baseLine.start.z - baseLine.end.z);
	 
	 return baseLine;
	 }
	 catch { }
	 //everything else failed, just return the base point without moving it
	 return point;
	 }

Objects/Converters/ConverterRevit/ConverterRevitShared/Partial Classes/ConvertLocation.cs line 74

While trying to get the location, it is expecting a point but our family instance i.e. column is giving a curve on familyInstance.Location.
Is there any solution for it?

Thank you in advance.

Hey Pooja,

Welcome to our community! Feel free to Introduce yourself 🙆 if you’d like.

Sounds like you’re running a fork of our connector or maybe sending custom data to it?
I believe that the objects you are sending are not getting captured by this check, where we process the family instance differently if it is a column: