Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys..
I have a list of xyz point by a txt file.
I import it and I create a CurveLoop
Then I have to check the intersection of this curve with a Line and find intersection point coordinates.
i use this code, but I receive an exception:
System.InvalidCastException: 'unable to casttype 'Autodesk.Revit.DB.Line' on type 'System.Collections.Generic.IEnumerable`1[Autodesk.Revit.DB.Curve]'.' on the intersect line code
where am i wrong?
Thanks
Stefano
Dim CurvaAsse3D As New CurveLoop
Dim CurvaAsse2D As New CurveLoop
For xx = 0 To listaPuntiAsse.Count - 1
If xx <> listaPuntiAsse.Count - 1 Then
Dim Linea As Line = Line.CreateBound(listaPuntiAsse(xx), listaPuntiAsse(xx + 1))
Dim Linea2d As Line = Line.CreateBound(listaPuntiAsse2D(xx), listaPuntiAsse2D(xx + 1))
CurvaAsse3D.Append(Linea)
CurvaAsse2D.Append(Linea2d)
End If
Next
Dim lineaprova As Line = Line.CreateBound(InternalPoint4, InternalPoint1)
Dim ptinter As XYZ = CurvaAsse3D.Intersect(lineaprova)
Solved! Go to Solution.