public void VisioPS_Get_Visio_Page_Cell() { var cells = new[] { "PageWidth", "PageHeight" }; var result_type = "Double"; var get_results = true; // Handle the page that gets created when a document is created var doc = VisioPowerShellTests.visiops_session.New_Visio_Document(); var datatable1 = VisioPowerShellTests.visiops_session.Get_Visio_Page_Cell(cells, get_results, result_type); Assert.IsNotNull(datatable1); Assert.AreEqual(8.5, datatable1.Rows[0]["PageWidth"]); Assert.AreEqual(11.0, datatable1.Rows[0]["PageHeight"]); //Now lets add another page and get it's width and height var page2 = VisioPowerShellTests.visiops_session.New_Visio_Page(); var datatable2 = VisioPowerShellTests.visiops_session.Get_Visio_Page_Cell(cells, get_results, result_type); Assert.IsNotNull(datatable2); Assert.AreEqual(8.5, datatable2.Rows[0]["PageWidth"]); Assert.AreEqual(11.0, datatable2.Rows[0]["PageHeight"]); VisioPowerShellTests.Close_Visio_Application(); }
public void VisioPS_NewVisioContainer() { var doc = VisioPowerShellTests.visiops_session.New_Visio_Document(); var app = VisioPowerShellTests.visiops_session.Get_Visio_Application(); var ver = VisioAutomation.Application.ApplicationHelper.GetVersion(app); var cont_doc = ver.Major >= 15 ? "SDCONT_U.VSSX" : "SDCONT_U.VSS"; var cont_master_name = ver.Major >= 15 ? "Plain" : "Container 1"; var rectangle = "Rectangle"; var basic_u_vss = "BASIC_U.VSS"; var rect = VisioPowerShellTests.visiops_session.Get_Visio_Master(rectangle, basic_u_vss); VisioPowerShellTests.visiops_session.New_VisioShape(rect, new[] { 1.0, 1.0 }); // Drop a container on the page... the rectangle we created above should be selected by default. // Since it is selected it will be added as a member to the container. var container = VisioPowerShellTests.visiops_session.New_Visio_Container(cont_master_name, cont_doc); Assert.IsNotNull(container); VisioPowerShellTests.Close_Visio_Application(); }
public void VisioPS_New_Visio_Document() { var doc = VisioPowerShellTests.visiops_session.New_Visio_Document(); Assert.IsNotNull(doc); VisioPowerShellTests.Close_Visio_Application(); }