He's posted before on this project, for example his hello world in C#, F# and IronPython article. This entry provides lots more examples (with huge screenshots), this time on using the Powershell and IronPython interactive interpreters to drive Visio:
Demo 1 – Shape formatting
Python
>>> vi.Start()
Powershell
vis> $vi.Start()
This will launch a new instance of Visio 2007 that is bound to the Interactive session. When Visio launches this way a new doc will be created with a single empty page. It will also load the Basic Shapes stencil – the interactive session depends on this stencil being loaded.
Draw some shapes in visio. Then select them all.
The selection is important – most of the VisioInteractive commands work on the active selection.
in the interactive shell, set the fill foreground color to red
Python: vi.Fill.ForegroundColor = 0xff0000
Powershell: $vi.Fill.ForegroundColor = 0xff0000
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.