Beispiel #1
0
        private void PostWarningAndResolveInFailurePreproccessor()
        {
            Transaction            transaction   = new Transaction(m_doc, "Warning_FailurePreproccessor");
            FailureHandlingOptions options       = transaction.GetFailureHandlingOptions();
            FailurePreproccessor   preproccessor = new FailurePreproccessor();

            options.SetFailuresPreprocessor(preproccessor);
            transaction.SetFailureHandlingOptions(options);

            transaction.Start();
            FailureMessage fm = new FailureMessage(m_idWarning);

            m_doc.PostFailure(fm);
            transaction.Commit();
        }
Beispiel #2
0
        private void DismissWarningInFailurePreproccesser(Level level1)
        {
            Transaction            transaction   = new Transaction(m_doc, "Warning_FailurePreproccessor_OverlappedWall");
            FailureHandlingOptions options       = transaction.GetFailureHandlingOptions();
            FailurePreproccessor   preproccessor = new FailurePreproccessor();

            options.SetFailuresPreprocessor(preproccessor);
            transaction.SetFailureHandlingOptions(options);

            transaction.Start();
            Line line  = Line.CreateBound(new XYZ(-10, 0, 0), new XYZ(-20, 0, 0));
            Wall wall1 = Wall.Create(m_doc, line, level1.Id, false);
            Wall wall2 = Wall.Create(m_doc, line, level1.Id, false);

            m_doc.Regenerate();

            transaction.Commit();
        }