コード例 #1
0
        public void DoesNotExist_returnsFalse()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

            var result = AttributeShim.AttributeSetExists(doc, "testSet");

            try
            {
                Assert.IsFalse(result);
            }
            finally { doc.Close(true); }
        }
コード例 #2
0
        public void DoesNotExist_returnsFalse()
        {
            Inventor.Application app = ApplicationShim.Instance();
            var      path            = app.DesignProjectManager.ActiveDesignProject.TemplatesPath;
            Document doc             = app.Documents.Add(DocumentTypeEnum.kPartDocumentObject, path + "Standard.ipt", true);

            var result = AttributeShim.AttributeSetExists(doc, "testSet");

            try
            {
                Assert.IsFalse(result);
            }
            finally { doc.Close(true); }
        }
コード例 #3
0
        public void DoesExist_returnsTrue()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

            //create the test attribute
            AttributeSet attributeSet = doc.AttributeSets.Add("testSet");

            var result = AttributeShim.AttributeSetExists(doc, "testSet");

            try
            {
                Assert.IsTrue(result);
            }
            finally { doc.Close(true); }
        }