// 创建Visio对象
IVApplication visio = ClassFactory.createApplication();
//创建新的空白文档【创建一个不基于模板的新绘图】
IVDocument document = visio.documents().add("");
// 获取当前活动页
IVPage ivPage = visio.activePage();
//在页上画一个正方形
IVShape ivShape = ivPage.drawRectangle(1, 2, 2, 1);
//在页上画一段弧形
// ivPage.drawArcByThreePoints(3, 3, 6, 8, 5, 5);
//导入图片
IVShape ivShape1 = ivPage._import("图片地址");
//画线并调整线的位置
IVShape vsoShape2 = ivPage.drop(visio.connectorToolDataObject(), 0, 0);
ivPage.shapes().itemFromID(vsoShape2.id()).cellsSRC((short)1,(short)23,(short)19).formulaU("1");
ivPage.shapes().itemFromID(vsoShape2.id()).cellsSRC((short)1,(short)23,(short)10).formulaU("16");
//1 英寸=25.4 毫米
//vis1DBeginX
vsoShape2.cellsSRC((short) 1, (short)4, (short)0).resultIU(7.5);
//vis1DBeginY
vsoShape2.cellsSRC((short)1, (short)4, (short)1).resultIU(-3.3);
//vis1DEndX
vsoShape2.cellsSRC((short)1, (short)4, (short)2).resultIU(-3.9);
//vis1DEndY
vsoShape2.cellsSRC((short)1, (short)4, (short)3).resultIU(-2.14);