[ORD C#】应用廊道模板失败

老师,应用廊道模板之后,廊道在实例化时( conE.PersistTransients)崩溃失败,请问是因为什么原因呢?

应用模板时没有出错也没有返回空

// 添加模板
templateDrop = ApplyTemplateTool.ApplyTemple(newCorridor, startDis, endDis, oldCorridorTmplate);
if (templateDrop == null)
{
return null;
}

Parents
  • 廊道模板应用,就下面这段代码,如果报错,请调试一下看看是否是参数设置或者是廊道本身的问题:

    void CreateTemplateDrop(CorridorEdit corridor, 
                            double startStation,
                            double endStation,
                            TemplateDefinition tempDef)
    {            
        TemplateDropParameters tempDropParams = new TemplateDropParameters(tempDef, startStation, endStation);
       tempDropParams.Interval = 5.0;
       tempDropParams.Desription = "Test Add TemplateDrop";
       TemplateDropEdit templateDrop =    corridor.AddTemplateDrop(tempDropParams);
    
        Return templateDrop;
    }

    Answer Verified By: 卫 成 

Reply
  • 廊道模板应用,就下面这段代码,如果报错,请调试一下看看是否是参数设置或者是廊道本身的问题:

    void CreateTemplateDrop(CorridorEdit corridor, 
                            double startStation,
                            double endStation,
                            TemplateDefinition tempDef)
    {            
        TemplateDropParameters tempDropParams = new TemplateDropParameters(tempDef, startStation, endStation);
       tempDropParams.Interval = 5.0;
       tempDropParams.Desription = "Test Add TemplateDrop";
       TemplateDropEdit templateDrop =    corridor.AddTemplateDrop(tempDropParams);
    
        Return templateDrop;
    }

    Answer Verified By: 卫 成 

Children