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

            //create the test Attribute
            double test = 16.00;

            AttributeShim.SetAttributeValue(doc, "testSet", "testAttribute", test);
            var result = doc.AttributeSets["testSet"]["testAttribute"].Value;

            try
            {
                Assert.AreEqual(result, test);
            }
            finally { doc.Close(true); }
        }
        public void Integer_SetExisting()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

            //create the test Attribute
            var test = 16;

            AttributeShim.SetAttributeValue(doc, "testSet", "testAttribute", 19);
            AttributeShim.SetAttributeValue(doc, "testSet", "testAttribute", test);
            var result = doc.AttributeSets["testSet"]["testAttribute"].Value;

            try
            {
                Assert.AreEqual(result, test);
            }
            finally { doc.Close(true); }
        }
Example #3
0
        public void Bool_SetNew()
        {
            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
            var test = true;

            AttributeShim.SetAttributeValue(doc, "testSet", "testAttribute", test);
            var result = doc.AttributeSets["testSet"]["testAttribute"].Value;

            try
            {
                Assert.AreEqual(1, result);
            }
            finally { doc.Close(true); }
        }