-1

How can I link a Delphi application with a Visio 2010 drawing? For example, I have an edit box on the app and a line on the Visio drawing. If I put "10" in the edit box on the app, I want the line length to become 10. (I'm not seeking code for this; it is just an example of the communication between the two I am looking for.)

Rob Kennedy
  • 156,531
  • 20
  • 258
  • 446
Glen Morse
  • 2,721
  • 7
  • 47
  • 92
  • a simple google search gives plenty results on how to use Visio with Delphi. where is your effort here? – RBA Jul 19 '12 at 10:11
  • please inform me i have done a lot of searching and found nothing. – Glen Morse Jul 19 '12 at 10:13
  • http://www.flex-graphics.com/ would be an example. second result from the search – RBA Jul 19 '12 at 10:14
  • thats just telling me to use a 3rd party addon , which i prefer not to use? I would like something on how to do the communication between the two – Glen Morse Jul 19 '12 at 10:16
  • 1
    There are millions of examples of automating Visio using COM that can be found with a websearch. I searched for *delphi visio com automation* and got oodles of hits. – David Heffernan Jul 19 '12 at 10:37
  • How do you expect people to want to help you when you won't try to do anything yourself first? A one-minute search turned up [this Visio automation with Delphi](http://www.wideman-one.com/gw/tech/Visio/delphi/index.htm) page. – Ken White Jul 19 '12 at 11:01
  • Others ask questions just like mine but dont get harassed.. http://stackoverflow.com/questions/7947437/data-linking-between-excel-data-and-visio-ppt – Glen Morse Jul 19 '12 at 11:21
  • Ked I do thank u for that link though I did not see it before – Glen Morse Jul 19 '12 at 11:54
  • FlexGraphics isn't really an example, @Rba. I don't get the sense that it controls Visio at all. Rather, it can display vector graphics itself, and it can read and write Visio's file format. It's more of a Visio *alternative* than something for *controling* it. – Rob Kennedy Jul 19 '12 at 14:03
  • @Rob - my mistake. I had not read carefully the specs. – RBA Jul 19 '12 at 14:07
  • 2
    Maybe so, @David, but Glen never mentioned COM in his question. Sometimes it can be hard to know what the right tool for the job is, and you just want to ask, "Is this what I'm supposed to use?" But that's a boring yes/no question. It's better to leave it open-ended: "What should I use?" And even if it's the same thing Google hints at, it can be reassuring for a human to explicitly tell you the answer. – Rob Kennedy Jul 19 '12 at 14:13
  • @Rob Perhaps my comment came across with the wrong tone, but factually, my comment is offering help. Now Glen knows the terminology he can search for it. – David Heffernan Jul 19 '12 at 15:33

1 Answers1

1

Visio exposes a COM object. Import the type library in Delphi, and Delphi will generate a wrapper unit for whatever the type library exports. Use the type library and the MDSN reference to access whatever Visio provides.

Rob Kennedy
  • 156,531
  • 20
  • 258
  • 446