public void AttDoesNotExist_returnsFalse()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

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

            try
            {
                Assert.IsFalse(result);
            }
            finally { doc.Close(true); }
        }
Example #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.AttributeExists(doc, "testSet", "testAttribute");

            try
            {
                Assert.IsFalse(result);
            }
            finally { doc.Close(true); }
        }
        public void AttDoesExist_returnsTrue()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

            //create the test attribute
            AttributeSet attributeSet = doc.AttributeSets.Add("testSet");
            Attribute    _            = attributeSet.Add("testAttribute", ValueTypeEnum.kStringType, "test string");

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

            try
            {
                Assert.IsTrue(result);
            }
            finally { doc.Close(true); }
        }
Example #4
0
        public void DoesExist_returnsTrue()
        {
            Inventor.Application app = ApplicationShim.Instance();
            var      path            = app.DesignProjectManager.ActiveDesignProject.TemplatesPath;
            Document doc             = app.Documents.Add(DocumentTypeEnum.kPartDocumentObject, path + "Standard.ipt", true);

            //create the test attribute
            AttributeSet attributeSet = doc.AttributeSets.Add("testSet");
            Attribute    _            = attributeSet.Add("testAttribute", ValueTypeEnum.kStringType, "test string");


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

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