The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Visio-rrible

Last post 05-09-2012 10:06 PM by Jaime. 17 replies.
Page 1 of 1 (18 items)
Sort Posts: Previous Next
  • 05-08-2012 2:46 PM

    Visio-rrible

    My favorite features in Visio:

    • When using the interop API, double-quotes must be included when setting the Formula property (which is a string); forgetting the double-quotes won't cause an error but the formula will be ignored. Ex:
      Cells[x].Formula = @""Width * 2"";
    • The GUARD() function used in the shape properties prevents one from changing the value, even using the API... unless the relevant "*force" method is used. So one can use the SetFormula method or the SetFormulaForce, depending on the value given to the decision made by the document's author of defining some properties as read-only. On a side note: I am really disappointed that there is no GUARDAGAINSTFORCE() method.
    • A group of shapes is actually a Shape that has multiple shapes in the shape.Shapes collection, some of which may or may not be groups themselves (or masters), and any group may have a special configuration preventing some arbitrary properties to be modified (even using the *force methods). Programmatically changing the color of a shape in a Visio document is an adventure in the land of Recursion and Try-Catch.
    • Some properties of a shape are actual properties, while other are defined as entries in the Cells property.
      • Want to change the fill style? Use the shape.FillStyle property.
      • Want to change the fill color? Use shape.Cells["FillBkgnd"].Formula (and don't forget the double double-quotes in the value)

      But the really, really nice feature in Visio is the hidden "Document Stencil" which is some kind of weird cache for the master shapes being used in a document, preventing a modification on a master to trickle down to the shapes that are already drawn in the document. Unsurprisingly the "Document Stencil" is read-only for users but there is at least a checkbox to unhide it (of course the checkbox is in the Developer tab which is hidden by default).



    2,993 people like this.
  • 05-08-2012 3:15 PM In reply to

    Re: Visio-rrible

    I remember when I had to do something with Visio about 7 years ago, and my hazy recollections say that you're selling the API short. It's much worse than that. I can only assume that your brain is bleeding from trying to get something done with it.
    I denounce myself for this post
  • 05-08-2012 4:08 PM In reply to

    Re: Visio-rrible

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible. Absolutely horrible, every last bit. Carving out your own organs with a plastic spork and spoon-feeding them to your children is less painful and traumatic for all parties involved than working with the Office COM API.

    This is a signature. It's not a good one, but it's still a signature.


  • Mon, February 30 2010 2:64 PM

    • Fabulous Darth Vader
    • Top 10 Contributor
    • Joined a long, long time ago
    • In a Glittery galaxy far, far away
    • Posts π x 10-14


    I have cornified this post, pray I don't cornify it further.






  • 05-08-2012 4:20 PM In reply to

    Re: Visio-rrible

    mott555:

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible. Absolutely horrible, every last bit. Carving out your own organs with a plastic spork and spoon-feeding them to your children is less painful and traumatic for all parties involved than working with the Office COM API.

    They made a special effort for the one in Word, where many methods return a 1-based array that cannot be read directly in C# (getting the pleasant exception: string[] is not a valid cast for string[*])


    2,993 people like this.
  • 05-08-2012 4:21 PM In reply to

    Re: Visio-rrible

    mott555:
    Carving out your own organs with a plastic spork and spoon-feeding them to your children...
    Wouldn't that be "spork-feeding them to your children"? Or are you being wasteful and using two entirely different disposable utensils when one would suffice?

    Let the healing begin!

  • I may not agree with everything Morbs just said, but he expresses himself in a way that is dignified, respectful, polite and non-threatening!
  • 05-08-2012 5:47 PM In reply to

    Re: Visio-rrible

     I used Visio once.

    It made me want to rape and kill.

  • 05-08-2012 5:51 PM In reply to

    Re: Visio-rrible

    da Doctah:

     I used Visio once.

    It made me want to rape and kill.

    I don't know about programming against its API, but I've used Visio quite a bit (as well as many other graphing and modeling tools) and I've found it to be the best, by far.

    Let the healing begin!

  • I may not agree with everything Morbs just said, but he expresses himself in a way that is dignified, respectful, polite and non-threatening!
  • 05-09-2012 12:01 AM In reply to

    Re: Visio-rrible

    My main peeve with Visio (and it's really frustrating to me) is that you can only connect a line to a shape at the center of the edge of the shape. Sure, you can draw lines to a shape anywhere along its edge, but the association won't be maintained if you drag the shape later. Many times I had a dozen or more lines attached to a rectangle, and I didn't want the lines to overlap so the crows' feet could be read clearly; then, inevitably, I needed to shuffle things around to avoid overlaps and suddenly I have to connect all the lines over again. And if you try to drag the lines and the shapes together, then it helpfully connects the lines to some unrelated shape because it thinks the line is still an orphan.

    It's one gripe, but it makes the tool damn near unusable sometimes.

    Signatures are stupid.
  • 05-09-2012 12:09 AM In reply to

    Re: Visio-rrible

    joe.edwards:

    My main peeve with Visio (and it's really frustrating to me) is that you can only connect a line to a shape at the center of the edge of the shape. Sure, you can draw lines to a shape anywhere along its edge, but the association won't be maintained if you drag the shape later. Many times I had a dozen or more lines attached to a rectangle, and I didn't want the lines to overlap so the crows' feet could be read clearly; then, inevitably, I needed to shuffle things around to avoid overlaps and suddenly I have to connect all the lines over again. And if you try to drag the lines and the shapes together, then it helpfully connects the lines to some unrelated shape because it thinks the line is still an orphan.

    It's one gripe, but it makes the tool damn near unusable sometimes.

    You can change the connection point settings to solve this problem. It's not intuitive but it should work.


    2,993 people like this.
  • 05-09-2012 12:11 AM In reply to

    Re: Visio-rrible

    Speakerphone Dude:
    You can change the connection point settings to solve this problem. It's not intuitive but it should work.

    A helpful reply? Are you sure you're on the right website?

    Signatures are stupid.
  • 05-09-2012 6:39 AM In reply to

    Re: Visio-rrible

    mott555:

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible.

    Isn't it possible to avoid the COM interop stuff entirely by using the libraries for OOXML? I understood from a former colleague who had used the old COM libraries and the more recent ones that things had got much better.
    You'll probably find that the forum experience is improved by going to the "Site Options" tab of "Edit Profile" and turning off "Display User Signatures".
  • 05-09-2012 8:38 AM In reply to

    • TheRider
    • Top 200 Contributor
    • Joined on 03-01-2005
    • Zurich, Switzerland
    • Posts 351

    Re: Visio-rrible

    morbiuswilters:
    da Doctah:

     I used Visio once.

    It made me want to rape and kill.

    I don't know about programming against its API, but I've used Visio quite a bit (as well as many other graphing and modeling tools) and I've found it to be the best, by far.
    Me too. I even painted entity-relationship models with it - and liked it (but maybe I am simply a masochist...)

     

    CodeNinja

    I'm starting to think our management is really a bunch of cats and someone standing nearby has a freaking laser pointer.
  • 05-09-2012 8:53 AM In reply to

    Re: Visio-rrible

    TheRider:
    morbiuswilters:
    da Doctah:

    I used Visio once.

    It made me want to rape and kill.

    I don't know about programming against its API, but I've used Visio quite a bit (as well as many other graphing and modeling tools) and I've found it to be the best, by far.
    Me too. I even painted entity-relationship models with it - and liked it (but maybe I am simply a masochist...)

    The normal interface is fine. The API feels like it was deliberately sabotaged, or at built from best practices garnered from the front page around here.
    I denounce myself for this post
  • 05-09-2012 10:41 AM In reply to

    • BPFH
    • Not Ranked
    • Joined on 11-27-2005
    • Posts 30

    Re: Visio-rrible

    boomzilla:
    The API feels like it was deliberately sabotaged, or at built from best practices garnered from the front page around here.

    You know, I used to wonder where Intuit got the ideas they used to build the QuickBooks SDK, but I think you just explained it for me...

     

  • 05-09-2012 12:21 PM In reply to

    Re: Visio-rrible

    pjt33:
    mott555:

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible.

    Isn't it possible to avoid the COM interop stuff entirely by using the libraries for OOXML? I understood from a former colleague who had used the old COM libraries and the more recent ones that things had got much better.
    This works on recent version for Word and Excel (those with the "x" at the end of the extension meaning that it's the xml-based format). For Visio, there has been a lot of "stability" in the API for the last 10 years...


    2,993 people like this.
  • 05-09-2012 8:22 PM In reply to

    • Cat
    • Top 500 Contributor
    • Joined on 07-24-2010
    • Posts 121

    Re: Visio-rrible

    mott555:

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible. Absolutely horrible, every last bit. Carving out your own organs with a plastic spork and spoon-feeding them to your children is less painful and traumatic for all parties involved than working with the Office COM API.

     

    I tried to learn COM by programming against the MS Office API.  Then I decided to give up and do something more fun, like pound nails through my dick.

  • 05-09-2012 9:35 PM In reply to

    Re: Visio-rrible

    Speakerphone Dude:

    My favorite features in Visio [...]

    I have an addendum: for some reason they seem to have removed multi-threading from the search function after Visio 2003; now whenever one is searching for a shape the whole GUI is frozen and non-responsive until the search is completed.



    2,993 people like this.
  • 05-09-2012 10:06 PM In reply to

    Re: Visio-rrible

    Cat:

    mott555:

    All of the COM interop stuff for Microsoft Office (and related apps such as Visio) is horrible. Absolutely horrible, every last bit. Carving out your own organs with a plastic spork and spoon-feeding them to your children is less painful and traumatic for all parties involved than working with the Office COM API.

     

    I tried to learn COM by programming against the MS Office API.  Then I decided to give up and do something more fun, like pound nails through my dick.

    BTW, Excel is the model for "how you're supposed to do it", the other Office apps are train wrecks. The APIs are also designed to be used from a language that supports optional parameters, like VB. VB6 and VB.Net have always worked very well with them, the experience from C# was horrendous until .Net 4.0. Office COM is also a lot better from a runtime that uses reference counting rather than garbage collection.
Page 1 of 1 (18 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems