I am not sure, whether this could solve your problem or not, as I have not tested it.
In Wildfire each group has an additional GroupLeader feature, which can be retrieved with GetGroupLeader() and renamed. This might be the way to the group name shown in the modeltree. Give it a try.
Another option could be to retrieve the features of the group, ungroup and recreate the group with the desired name. I have not found any ungroup method, but again maybe just deleting the GroupLeader feature will do the job.
Let me know if any of these ideas was useful. Bjarne
Marc Mettes <-> 14-12-2009 18:48 Please respond to Marc Mettes <->
To - cc
Subject [proecus] - RE: rename a group in a JLink program?
> I found a SetName command for the ModelItem interface, and tried to cast the > featuregroup to a ModelItem, ... but the cast command throws an exception. You cannot cast a FeatureGroup to ModelItem, because it is not derived from that class. To make matters worse, the FeatureGroup class seems not to provide a SetName() method, according to the docs.
Marc -- Marc Mettes - Visit My CAD/PDM Automation Blog Or, Subscribe to My CAD/PDM Automation Blog by Email