Author Topic: Org Chart automation  (Read 81 times)

0 Members and 1 Guest are viewing this topic.

pbassett

  • Newbie
  • *
  • Posts: 7
Org Chart automation
« on: July 12, 2018, 10:32:33 AM »
Hi,

Can someone point me to code snippets to build an Org Chart from ODBC data? I can't get the macro recorder doesn't capture the steps, otherwise I wouldn't need to post this request.

I have been tasked with creating approximately 40 Org Charts, with photos, on a weekly basis.
The data is in ODBC and I can easily create Org Charts manually following the wizard, but of course I need to automate this task.

Below are the steps I use. This would be only need to be tweaked for the Manager name as I get deeper into a department, e.g. Nurses with hundreds of staff, so the basic code to do this would be all I need.

•   Open Visio
•   New -> Organization Chart
   I want to create my …
   Information that’s already stored in a file or database
   An ODBC-compliant data source
   EXAADHP -> enter password and connect to database                                   [ODBC data source name]
   H11MYAVATAR.ASH_ORG_CHART                                                                 [table name]
   Name POS_POSITION; Reports to SUPERVISOR_POSITION
   Next ; Back
   Name EMP_NAME; Reports to SUPERVISOR_POSITION
   Displayed field in order
   EMP_NAME
   POS_DESCRIPTION
   POS_POSITION
   POS_PAY_GRADE
   Next; Copy database records to shapes
   Locate the folder (Employee Photos pathname above)
   Match pictures based on EMP_NAME
   I want to specify …
   Select manager and modify page to set # of levels (generally 1 level)


wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3187
  • Ideas Visio-lized into solutions
Visio 2007 Std