I'm developing an Add-on that generates some information from a selected wall. For that, I need information on the connections of a wall. I've been using the API_WallRelation and, for the most part of the cases, everything works fine (conBeg, conEnd and con types of connection).
But, for the highlighted wall on the attached image, I need to use the conRef type of connection (from docs: "walls connected with their reference line to the beginning or the end point of the wall"). In this case, the wall has two connections (one at the beginning and the other one at the end). When I access the second conRef connection, Archicad crashes. Here's the code: