Generating family tree from data

Started by luca87, April 12, 2011, 07:40:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

luca87

hi to all,i'm just beginner with visio so i hope u can help me, maybe there is already an add-on that does what i need...
I'm trying to generate a family tree importing data from access(or excel). in the database i have two tables:one for person(id,name,surname,date of birth...etc etc) and one for marriage(marriage_id,date of marriage,wife_id,husband_id)

I tried using a org chart draw for importing data and i imported person table.
but the Report_to allows me only to connect to one shape; so how i can connect child to both mother and father?
then how i can connect wife to her husband that is not a hierarchical connection? (can i put a small shape between wife and husband as connector?)

thx for answers and sorry for my bad english.
 

Jumpy

AFAIK you can't use the Org Chart Wizard for that, because the AddOn behind it prevents any creativity, such as two parents/superiors for a child/worker.

Maybe the Database Wizard could be a way. Otherwise you need own shapes and code for that.   

cliff50

just a thought...I am thinking you may need an extra column "parent_unionID",in the marriage table for the hierachial connection.. which would allow you to identify "offspring"(sons and daughters) from the marriage. this would of course reference back to the other table where you identify the person.. I would use the database wizard as suggested.. my style would then be to have a third table ( essentially an amalgumation of the two) which would show person ID name, birth date and parents_union ID... create a person shape .. use the custom properties to link to entries in the third table.. at this point you at liberty to have the custom shape properties  react with the shape's shapesheet cells to allow placement and interaction on a family tree diagram

luca87

ok thx i will try with database wizard.

how difficult is to create own shapes that can be used like the org chart shapes?

can i open viso xml files

@cliff50   i don't understand why u suggest a third table: i thought i need a shape for each person(e.g. a rectangle) and another shape for marriage(e.g. a double arrow), then it has to put the marriage shape in between the two person shapes and use it to connect them (having wife and husband id into the marriage table). i tought to obtain something more or less like in the htm file i attached.

another solution can be drawing the tree manually in visio using just rectangle,double arrow, and tree connector shapes and then exporting to access?



cliff50

yeah .. yes it would probably make it easier if you have two types of shapes , a shape for individuals and a shape representing the marriage.. the person shape may link to your person table (use the database wizard) and the multiple arrow links to the marriage table (database wizard).. for my mind you still need that extra column in the marriage table to identify "off spring" from the marriage.

I am thinking on the page.... what you then see is only person shapes associated with the marriage shape, may connect to the multiple arrow which represents the information in the marriage table....maybe this would involve formulas in the shapesheets  or possibly VBA coding

luca87

#5
@cliff: i linked shapes to the two tables using the database wizard, but it drawed just the shapes without any spacing or layout,not a diagram;
now i have the rectangles for people and the double arrow for marriage. how i can set the connection while or before importing them?



is it possible to import more than 1 excel/db table on the same draw in org chart?
cause if it's possible i found the way to draw the tree, using manager or executive for couples and position shape for children/singles so i have only a report_to.

cliff50

to my mind.. the direction you a heading is->  you will have to draw the tree (seperation and layout manually)/:"another solution can be drawing the tree manually in visio using just rectangle,double arrow, and tree connector shapes and then exporting to access?"

to automate the drawing of the tree etc will require VBA coding and this solution will be complex

maybe others can advise on org charts.

Jumpy

My advice is not to use the org chart shapes, because your task is too individual, too specific.
The org chart AddOn will interfere in ways you don't want and to workarround that will be driving you nuts.

Better to implement your own shapes and your own VBA code, even if it's much effort, too.


cliff50

@newbie ..I am not sure how big you expect the tree to be ... are you able to make the double arrow fill colour dependant upon the marriage_ID in the marriage table? I believe you can do this in the shapesheet->fillcolor, if you have the double arrow linked to the marriage table

luca87

i don't expect to make a very big tree,at max 50 people.

linking shapes to data is not a problem, the problem is to place shapes and make the connectors automatically.

if i do it manually on visio, the when i export the draw to a database, it exports also the position of the shape on the page? something like x,y coordinates and number of spaces from connected shapes?

luca87

Can u give me some visio vb code that can i use to make an add-on similar to Org Chart one?

I saw that RsOrgData example and it's very interesting, but not working on my visio 2010, i need something very similar to it, the only change i want is to use my own excel table instead of that of the example