【ORD C#】在VS2015中直接唤起ord进行调试,ord打开dgn崩溃,再次重启ord后[Ord建模中]的按钮都用不了,点击按钮会出现下图中的问题。用了三台电脑尝试后都出现相同的问题,目前很不确定到底是哪里出了问题?

        public static void openProfile(string unparsed)
        {
            DgnModel dgnModel = Session.Instance.GetActiveDgnModel();
            long myid = 1231;
            ElementId elId = new ElementId(ref myid);
            Element ele = dgnModel.GetDgnModel()
                                  .FindElementById(elId);
            if (ele != null)
            {
                ConsensusConnectionEdit con = ConsensusConnectionEdit.GetActive();
                AlignmentEdit al = (Alignment.CreateFromElement(con, ele)) as AlignmentEdit;
    
                DPoint3d[] points = { new DPoint3d(100, 100), new DPoint3d(600, 110), new DPoint3d(1000, 105) };
                
                ProfileElement element = ProfileElement.Create1(450.0, 750.0, points);
                if (element != null)
                {
                    con.StartTransientMode();
                    ProfileEdit edit = ProfileEdit.CreateByProfileElement(con, al, element, true, false); 
                    con.PersistTransients();
                    al.SetActiveProfile(edit);
                }
            }
        }