Dim neato Set neato = CreateObject("Wingraphviz.neato") if neato is Nothing then Msgbox "Unable to load the object Wingraphviz.neato" end if Dim Img Set Img = neato.ToPNG("graph G { dst1 -- src [ dir=back ]; src -- dst2 [ dir=forward ]; }; ") if Img is Nothing then Msgbox "Unable to generate to PNG" end if Dim FilePath FilePath = "test.png" if Img.save(FilePath) then Msgbox "Image saved at " + FilePath else Msgbox "Unable to save image at " + FilePath end if Set Img = Nothing Set neato = Nothing