none
how do i know what commands i can pass while calling addon.run command from C# for Reports...(VisRpt lobal name) RRS feed

  • Question

  • Addon a = application.Addons[56];  
    a.Run(@"/rptDefName=d:\users\documents\CodeGen.vrd /rptPath=d:\\Users\\Documents\\Report_5.xml /rptOutput=XML");

    hi Team,

    i am writing the above piece of code to run the reports addon from visio doc using the .vrd template.

    can anyone suggest how do i know all valid parameters for any addon that visio provides.

    am i passing the correct parameters here?


    Bishnupriya Pradhan

    • Moved by Max Meng Friday, March 2, 2012 2:23 AM Moving to a more appropriate forum (From:Visio General Questions and Answers for IT Professionals)
    Thursday, March 1, 2012 10:15 PM

Answers

  • documenting parameters required to run an addon are the responsibility of the developer. The only addon that I saw that was close to being documented was the orgchart wizard (you can call it from a command line). Since many addons have custom stencils associated with them, one technique is to just examine the actions section of the shapesheet. In your case the report addon uses (I believe) a custom set of xml instructions. John Marshall did an article on his web-site on the addon (visio.mvps.org)

    al


    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP

    • Marked as answer by Bruce Song Tuesday, March 20, 2012 9:31 AM
    Saturday, March 3, 2012 3:23 AM

All replies

  • I hope that 56 is not permanent! The add-on number will be different on just about every computer, it may also change on your own computer.


    -- Paul Herber, Sandrila Ltd. http://www.sandrila.co.uk/ Engineering and software shapes for Visio.

    Thursday, March 1, 2012 10:29 PM
  • probably yes, but my question is,now that i figured out that 56 is the index for VisRpt/Reports... addon, how do i know what are the correct parameters to pass on?

    thanks.


    Bishnupriya Pradhan

    Thursday, March 1, 2012 10:32 PM
  • Reports are addon number 57 on this laptop.

    You need to loop through all the addons and find which one has the NameU = "Reports.."


    -- Paul Herber, Sandrila Ltd. Engineering and software shapes for Visio - http://www.sandrila.co.uk/

    Thursday, March 1, 2012 10:49 PM
  • well, again, i know to loop in and find out the index for Reports..in any computer.

    Assume that i got the index now programmtically. After that i want to run the addon. now how do i run it? i will say Addon.Run(@<parameter name> = value).

    here i am stuck, how do i know whta parameters do i have to pass.


    Bishnupriya Pradhan

    Thursday, March 1, 2012 11:06 PM
  • documenting parameters required to run an addon are the responsibility of the developer. The only addon that I saw that was close to being documented was the orgchart wizard (you can call it from a command line). Since many addons have custom stencils associated with them, one technique is to just examine the actions section of the shapesheet. In your case the report addon uses (I believe) a custom set of xml instructions. John Marshall did an article on his web-site on the addon (visio.mvps.org)

    al


    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP

    • Marked as answer by Bruce Song Tuesday, March 20, 2012 9:31 AM
    Saturday, March 3, 2012 3:23 AM