//unit:nm
 double GetActiveModelBoundaryZ()
 {
     BD.DgnModel activemodel = Program.GetActiveDgnModel();
     BG.DRange3d modelrange;
     activemodel.GetRange(out modelrange);
     return(modelrange.Low.Z);
 }
示例#2
0
 public void SelectedCellNameChanged()
 {
     if (cellDgnFile == null)
     {
         mc.ShowErrorMessage("未载入任何cell库文件", "未加载cell库文件", false);
         return;
     }
     BD.StatusInt loadStatusInt;
     BD.DgnModel  selecteDgnModel = cellDgnFile.LoadRootModelById(out loadStatusInt,
                                                                  cellDgnFile.FindModelIdByName(SelectCellName));
     if (BD.StatusInt.Success != selecteDgnModel.FillSections(BD.DgnModelSections.All))
     {
         mc.ShowErrorMessage($"无法填充{selecteDgnModel}模型", "无法填充模型", false);
         return;
     }
     BG.DRange3d selectedModelDRange3D;
     if (selecteDgnModel.GetRange(out selectedModelDRange3D) != BD.StatusInt.Success)
     {
         mc.ShowErrorMessage($"无法获得{selecteDgnModel}模型的范围", "无法获得模型范围", false);
         return;
     }
     MasterUnitTooltip = $"单位:{GetMasterUnit(selecteDgnModel)}";
     celluor           = selecteDgnModel.GetModelInfo().UorPerMaster;
     celluorMeter      = selecteDgnModel.GetModelInfo().UorPerMeter;
     UAxisOffset       = selectedModelDRange3D.XSize / celluor;
     VAxisOffset       = selectedModelDRange3D.YSize / celluor;
 }