In the "Introductions" thread, Jim discussed some of the problems he ran intowith the AV documentation. See http://softwareforums.intel.com/ids/board/message?board.id=Visualizer&message.id=7.
root.Graphs.Item("foo").Camera.Viewpoint(AV_XCOORD) = 3.12;
root.Graphs.Item("foo").Camera.Viewpoint(AV_YCOORD) = 1.28;
root.Graphs.Item("foo").Camera.Viewpoint(AV_ZCOORD) = 1.41;
Here "root" is the reference to the top Group instance. A more efficient way to code this would be to first get the reference to the camera and then set the viewpoint:
var hCamera = root.Graphs.Item("foo").Camera; hCamera.Viewpoint(AV_XCOORD) = 3.12; hCamera.Viewpoint(AV_YCOORD) = 1.28; hCamera.Viewpoint(AV_ZCOORD) = 1.41;
But anyway, since Fortran doesn't support this type of syntax, the code to do the same thing in Fortran looks a bit different:
hGraphs = avGraphs(hRoot) hGraph = avItem(hGraphs, "foo") hCamera = avCamera(hGraph) call avSetViewpoint(hCamera, (/1.5_8, 1.9_8, 0.6_8/), status)
Or we can nest the object reference calls to do everything in one line:
call avSetViewpoint(avCamera(avItem(avGraphs(hRoot), "foo"))
So instead of working our from the top down: root.graphs.camera, we go from the bottom up: camera(graphs(hRoot)).
Now thinking about this from the documentation point of view, one thing I think we should really have is for all the AvObjMod routines and functions to be in the help index. Given that, typing avSetViewPoint would take you to the Viewpoint property page of the camera object. Wouldn't that go a long way in helping what object reference to use? It might help more if when you went to the camera object in the help, it gave you some hints on how to get a reference to a camera. I'm just thinking that updating the syntax for each property/method for each object would be overkill.
Something else that might help is printing out a copy of the object heirarchy diagram. It's in the help; I've also attached it here. The diagram should help you navigate up and down the object model.
Something else that I think would helpis a series of tutorials on using AV. I'm hoping to might some progress on that front this year. I might post these to the forum to get feedback before incorporating them in the help proper.
Message Edited by jlreadey on 10-16-2005 07:13 PM