This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Microsoft.Office.Interop.Visio; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
// | |
// медленно! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.tooltip-inner { | |
background-color: #fff; | |
color: #000; | |
border: 1px solid #000; | |
min-width: 150px; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.panel-body { | |
max-height: none; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.popover { | |
min-width: 400px; | |
min-height: 250px; | |
max-width: none; | |
} | |
.popover img { | |
height: 150px; | |
width: auto; | |
float: left; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("listing shapes") | |
// for each diagram shape, log it's name | |
$.each(diagram.shapes, function(id) { | |
var shape = diagram.shapes[id]; | |
console.log(shape.Text); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visio.run(function(ctx) { | |
ctx.document.application.showToolbars = true; | |
return ctx.sync(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// show message box on shape selection | |
diagram.selectionChanged.add(function(shapeId) { | |
// if selected | |
if (shapeId) { | |
var shape = diagram.shapes[shapeId]; | |
alert('you selected shape: ' + shapeId + ', text:' + shape.Text); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visio.run(function (ctx) { | |
var page = ctx.document.getActivePage(); | |
var shapes = page.shapes; | |
shapes.load(); | |
return ctx.sync().then(function () { | |
for (var i = 0; i < shapes.items.length; i++) { | |
var shape = shapes.items[i]; | |
console.log("Shape Text: " + shape.text); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visio.run(function (ctx) { | |
var application = ctx.document.application; | |
application.showToolbars = false; | |
return ctx.sync(); | |
}).catch(function(error) { | |
console.log("Error: " + error); | |
if (error instanceof OfficeExtension.Error) { | |
console.log("Debug info: " + JSON.stringify(error.debugInfo)); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visio.run(function (ctx) { | |
var activePage = ctx.document.getActivePage(); | |
var shapeName = "Position Belt.41"; | |
var shape = activePage.shapes.getItem(shapeName); | |
var shapecomments= shape.comments; | |
shapecomments.load(); | |
return ctx.sync().then(function () { | |
for(var i=0; i<shapecomments.items.length;i++) | |
{ | |
var comment= shapecomments.items[i]; |
OlderNewer