how do i know what commands i can pass while calling addon.run command from C# for Reports...(VisRpt lobal name)
Thursday, March 01, 2012 10:15 PM
Addon a = application.Addons; a.Run(@"/rptDefName=d:\users\documents\CodeGen.vrd /rptPath=d:\\Users\\Documents\\Report_5.xml /rptOutput=XML");
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?
- Moved by Max MengMicrosoft Contingent Staff Friday, March 02, 2012 2:23 AM Moving to a more appropriate forum (From:Visio General Questions and Answers for IT Professionals)
Thursday, March 01, 2012 10:29 PM
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 01, 2012 10:32 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?
Thursday, March 01, 2012 10:49 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 01, 2012 11:06 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.
Saturday, March 03, 2012 3:23 AM
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)
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 SongModerator Tuesday, March 20, 2012 9:31 AM