Ejemplo n.º 1
0
        public void PartDocument_IsReturned()
        {
            Inventor.Application app = ApplicationShim.Instance();
            var      path            = app.DesignProjectManager.ActiveDesignProject.TemplatesPath;
            Document doc             = app.Documents.Add(DocumentTypeEnum.kPartDocumentObject, path + "Standard.ipt", true);

            var doc2 = doc.ReturnSpecificDocumentObject();

            //var tt = doc2.GetPropertyValue("Author");
            var tt = PropertyShim.GetPropertyValue(doc2, "Author");
            //only exists in ParDocuments
            PartComponentDefinition test = null;

            try
            {
                test = doc2.ComponentDefinition;
            }
            catch { }

            try
            {
                Assert.IsNotNull(test);
            }
            finally { doc.Close(true); }
        }
        public void AssemblyDocumentIn_ReturnsDocument()
        {
            var doc = tests.TestUtilities.CreateAssemblyDocument();

            var doc2 = doc.GetDocumentFromObject();

            var tt = PropertyShim.GetPropertyValue(doc2, "Author");
            //only exists in ParDocuments
            PropertySets test = null;

            try
            {
                test = doc2.PropertySets;
            }
            catch { }

            try
            {
                Assert.IsNotNull(test);
            }
            finally { doc.Close(true); }
        }
Ejemplo n.º 3
0
        public void PartDocument_IsReturned()
        {
            var doc = tests.TestUtilities.CreatePartDocument();

            var doc2 = doc.ReturnSpecificDocumentObject();

            //var tt = doc2.GetPropertyValue("Author");
            var tt = PropertyShim.GetPropertyValue(doc2, "Author");
            //only exists in ParDocuments
            PartComponentDefinition test = null;

            try
            {
                test = doc2.ComponentDefinition;
            }
            catch { }

            try
            {
                Assert.IsNotNull(test);
            }
            finally { doc.Close(true); }
        }
        public void AssemblyDocumentIn_ReturnsDocument()
        {
            Inventor.Application app = ApplicationShim.Instance();
            var      path            = app.DesignProjectManager.ActiveDesignProject.TemplatesPath;
            Document doc             = app.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, path + "Standard.iam", true);

            var doc2 = doc.GetDocumentFromObject();

            var tt = PropertyShim.GetPropertyValue(doc2, "Author");
            //only exists in ParDocuments
            PropertySets test = null;

            try
            {
                test = doc2.PropertySets;
            }
            catch { }

            try
            {
                Assert.IsNotNull(test);
            }
            finally { doc.Close(true); }
        }
Ejemplo n.º 5
0
 public void ShortGoodInput()
 {
     Assert.IsFalse(PropertyShim.IsPropertyNative("ThisShouldBeFalse"));
 }
Ejemplo n.º 6
0
 public void GoodInput()
 {
     Assert.IsTrue(PropertyShim.IsPropertyNative("Title"));
 }