示例#1
0
        public static void Start()
        {
            DocSysVarAuto.Start();
            LispAutoloader.Start();

            // DbDictionaryCleaner - фаталит при открытии чертежей!!!
            // DbDictionaryCleaner.Start();
            Application.DocumentManager.DocumentCreated += (s, e) => OnDocumentCreated(e?.Document);
            foreach (Document doc in Application.DocumentManager)
            {
                OnDocumentCreated(doc);
            }
        }
示例#2
0
        private static void OnDocumentCreated(Document doc)
        {
            if (doc == null)
            {
                return;
            }
            try
            {
                LispAutoloader.LoadLisp(doc);
            }
            catch (Exception ex)
            {
                Logger.Log.Error(ex, "LispAutoloader.LoadLisp");
            }

            try
            {
                DocSysVarAuto.SetSysVars(doc);
            }
            catch (Exception ex)
            {
                Logger.Log.Error(ex, "DocSysVarAuto.SetSysVars");
            }
        }