The attached script would help you. It replaces the geometry of one object by other, and update names and materials in all Forest objects.
To use it, just set the name of the objects in the two first variables and run it (with the default values, it replaces the "box" by the "cone")
-- object that we want to replace
src = $box
-- object that will replace it
dst = $cone
-- processing
instanceReplace src dst
src.name = dst.name
for i in Geometry where classOf i == Forest_Pro do
(
for n = 1 to i.cobjlist.count do
(
if (i.geomlist[n] == 2) and (i.cobjlist[n] != undefined) then
(
i.matlist[n] = i.cobjlist[n].material
i.namelist[n] = i.cobjlist[n].name
)
)
)