I think what is happening, is that the bounding sphere rec has not been attached yet. The method you are attempting to do requires too much work and is not the suggested approach. It is much easier just to set the attribute on the group node and let the api do its magic for you. You don’t need to get the bounding box rec, then the bounding sphere rec. Just set the fltBSRadius attribute on the group node. This works for all nested attributes with one exception. If there are two attributes with the same name nested under a node, then you can’t use this method. (For example two nested records that have a fltCoord3d, the api would not know what one you want to set.) This is uncommon however, and not necessary in this case.
See the OpenFlight_API_Users_Guide_Vol1.pdf for a mor detailed explanation:
Nested Attributes
Attribute records are arranged hierarchically. For example, the fltPolygon record code
describes a record’s node type; within fltPolygon there are record codes such as
fltPolyColor and fltPolyMaterial, which describe drawing attributes of the
polygon.
Some attributes have further nesting; for example, the fltGroup node type has a
fltBoundingBox record, which in turn has attributes of type fltCoord3d and
fltBoundingSphere. You can access nested attributes in the same way as you access
simple ones; the nesting is transparent to you. You need to specify only the node record and
the desired attribute’s record code. For example:
mgGetAttList (groupNode, fltGrpPrio, &prio;, fltBCRadius,&radius;,
fltBCHeight,&height;, fltBYaw, yaw, MG_NULL);
The same holds true for record creation. When you specify the values for a nested attribute,
the API creates the nested records for you:
mgSetAttList (groupNode, fltGrpPrio, prio, fltBCRadius, radius,
fltBCHeight, height, fltBYaw, yaw, MG_NULL);