[ORD SDK C#] Crash trying to get Referenced Alignment Points

Hi all,

I am putting some code together to scan DGN references for a particular alignment (by Name) and when found, I want to extract a station measurement from a particular point.

I can get it all to work except for extraction of any data from the alignment. In the code below the ProjectPointOnPerpendicular lines always result in a crash and I am unable to catch that exception either.

Does any one have any ideas where i am going wrong?

                            foreach (GeometricModel geomModel in geomModels)
                            {
                                al = geomModel.GetAlignmentByName(sCorrID);

                                if (al != null)
                                {
                                    ShowInfoMessage("Found Alignment: " + sCorrID, "", false);

                                    LinearPoint lpSt = al.LinearGeometry.ProjectPointOnPerpendicular(metricPoint1);
                                    LinearPoint lpEnd = al.LinearGeometry.ProjectPointOnPerpendicular(metricPoint2);

Regards,

Mark


OpenRoads Designer 2020 R3 (10.09)  |  Microstation CE Update 16  |  ProjectWise CE 3.4

Parents Reply Children
No Data