I’m trying to save the content of a map to an Access table, and need to go through all the objects in a document.
Well, I’m not a database expert, but it seems like you’d need another Table with columns something like (LinkID, pointIndex, X, Y), and you’d add a row for each point.
Jake
I don't know if you need to save the paths of each link. If you do, you can get the array of points by calling GoLink.CopyPointsArray(), or GoLabeledLink.RealLink.CopyPointsArray(). Restore these paths after you have finished restoring the positions of all of the nodes, by calling GoLink.SetPoints.
Real databases aren’t perfectly normalized, so I would just store the array of floating point numbers returned by CopyPointsArray() as a string.
it’s late over here, and I’m past the deep thought stage but if I think what you’re saying is that I can store all the points as a string in my “Links” table rather than having a seperate table of “Points” than that will be great
Yes, you can convert it to a string. Just make sure the size of the field is big enough to not truncate the string.
Yes, you can set the points. Create the GoLink, set its various properties, including FromPort and ToPort, add it to your document, and then call SetPoints.
You have to call SetPoints last because setting some of the other properties might cause the route (i.e. the path formed by its points) to be recalculated.