in reply to Re^2: How do I dicern and pull data elements from a Visio
in thread How do I dicern and pull data elements from a Visio

If anybody is still tracking this thread: Ok, easy enough to answer. It was yet another thread on this site where I found it. Here is some code that got me started:
use strict; use warnings; use Win32::OLE; $Win32::OLE::Warn = 3; my $path = "c:\\Documents and Settings\\eggmatters\\Desktop\\VisioProj +ect\\"; my $file = "viSamp.vsd"; my $Visio = Win32::OLE->new('Visio.Application', 'Quit'); my $VDocs = $Visio->Documents; my $VDoc = $VDocs->Open("$path$file"); my $VPage = $VDoc->Pages->Item(1); my $VShapes = $VPage->Shapes; my $VShape = $VShapes->Item(1); $VShape->{Text} = "New Name"; print $VShape->{Text}; $VDoc->SaveAs($path."test2.vsd");
Here, I've assigned the text before dicerning it but that doesn't matter. To 'get' the text, you just need to call $VShape->(Text); and there you have it. For people like me who have to rely on Visio modeling of Web sites and applications, This will definitely be a huge bonus in implementing validation tools and chart editors.