示例#1
0
        public ConnectorBindingsMicroStationOpen2() : base()
        {
            Control = new System.Windows.Forms.Control();
            Control.CreateControl();

            ModelUnits = Model.GetModelInfo().GetMasterUnit().GetName(true, true);

#if (OPENROADS || OPENRAIL)
            ConsensusConnection sdkCon = Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit.GetActive();
            GeomModel = sdkCon.GetActiveGeometricModel();
#endif
        }
        public void SetContextDocument(object session)
        {
            Session = (Session)session;
            Doc     = (DgnFile)Session.GetActiveDgnFile();
            Model   = (DgnModel)Session.GetActiveDgnModel();
            UoR     = Model.GetModelInfo().UorPerMaster;
#if (OPENROADS || OPENRAIL)
            ConsensusConnection sdkCon = Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit.GetActive();
            GeomModel = sdkCon.GetActiveGeometricModel();
#endif
            Report.Log($"Using document: {Doc.GetFileName()}");
            Report.Log($"Using units: {ModelUnits}");
        }