Last edit: 05-03-17 Graham Wideman |
Visio + Delphi |
Visio Automation Controller Using Delphi Article created: 99-02-01 |
99-10-29: Delphi 5 Update: Don't proceed until you check out Delphi 5's somewhat more advanced COM Automation wrapper features. These are discussed in the D5 Developer Manual. When Delphi imports a type library, it now wraps the Events as well, making event handling as easy as in Visual Basic. This means that you don't need the utility from Binh Ly that's discussed herein if you go that route. However, the Delphi event wrapper still doesn't solve the issue of hooking up events that Visio only supplies via AddAdvise... so the following article and code may still be useful. |
It seems that controlling Visio via OLE Automation from Delphi is a frequent topic on Visio's discussion groups, and often a source of some confusion. Several historical reasons have played a part in this:
So, herewith a Delphi unit that takes care of the tricky bits, and a demo of how to do it, event-handling included.
Initial Design Decisions VSL versus Stand-Alone controller Interface methods Event-handling methods |
|||||||||||
The Demo and Library Code
|
Go to: Up to: [Visio]