Where to find "OrgC11" commands?

Started by nashwaan, September 08, 2010, 03:38:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nashwaan

Does anybody know where to find "OrgC11" commands?

Bill Morein from MS Visio said there is no reference: http://www.eggheadcafe.com/forumarchives/visiodeveloperVisualBasica/Nov2005/post24370910.asp  :-\
However, VisioGuy (Chris Roth) menthioned in his post http://www.visguy.com/2008/02/25/edit-visio-masters-programmaticallythe-right-way/comment-page-1/#comment-18345 that these commands can be found by analyzing GUIobject. but how to do this?  ???

i understand that there are two methods to execute organization chart addon commands (i think they can be used interchangeably):
method 1:
   Call Visio.Application.Addons("OrgC11").Run("/LayoutDlg")
method 2:
   Dim adn As Visio.Addon
   Set adn = Visio.Addons("OrgC11")
   adn.Run "/cmd=LayoutDlg"

I *discovered* some OrgC11 commands like "ReLayout", "InsertPicture", "DeletePicture", "HidePicture", "HideDivider", "HideSubordinates", etc...
but i could not find a reference/list for all of these command.


Now I have been looking for the command to:
  "Change Spacing": for example, i want to change the value of "spacing from superior to subordinates" via VBA code.

Or is there another way to set the value of "spacing from superior to subordinates" without resorting to OrgC11 addon.Run commands?

thanks,
Yousuf  :)
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

Vincent.Chang

Hello,
I am working on this function. Becuse I can't find any ORGC11 commands. As below is what I do to solve the layout function in C#. For your reference...
1. after the statement AddEx execution and the OrgChart tool bar is showed.(attachment)
    myApp.Documents.AddEx("orgch_m.vst", Visio.VisMeasurementSystem.visMSDefault, 0, 0);
2. add some shapes
3. each time get the commandbar control and execute
    a. Do the layout
            Office.CommandBars cmdbars = (Office.CommandBars)myApp.CommandBars;
            Office.CommandBar orgCmdBar = cmdbars["組織圖"];
            Office.CommandBarControl DoControl = orgCmdBar.Controls[1];
            DoControl.Execute();
    b. Do the VerticalLeft layout
            // have to do selection of any parent shape//
            Office.CommandBars cmdbars = (Office.CommandBars)myApp.CommandBars;
            Office.CommandBar orgCmdBar = cmdbars["組織圖"];
            Office.CommandBarControl verticalLayout = orgCmdBar.Controls[3];
            Office.CommandBarControl DoControl = (Office.CommandBarControl)verticalLayout.get_accChild(1);
            DoControl.Execute();