You could try to catch the "OnNewFeature" event. In the function that handels this event you can write the code to rename solid (surfacebody).
C#
inventor.ModelingEvents.OnNewFeature += newFeature;
private void newFeature(
_Document DocumentObject,
PartFeature Feature,
EventTimingEnum BeforeOrAfter,
NameValueMap Context,
out HandlingCodeEnum HandlingCode)
{
if (BeforeOrAfter == EventTimingEnum.kAfter)
{
// TODO code to rename solid (surfacebody).
}
HandlingCode = HandlingCodeEnum.kEventHandled;
}
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com