Ilogic Solid renaming

DominiqueBernardi5116
Contributor
Contributor

Ilogic Solid renaming

DominiqueBernardi5116
Contributor
Contributor

Good morning everyone,

looking on the forum I found many post explaining how to rename solid (surfacebody) afterward.

But how to do just after creating the new feature.

Regards

0 Likes
Reply
Accepted solutions (1)
403 Views
2 Replies
Replies (2)

JelteDeJong
Mentor
Mentor
Accepted solution

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.

EESignature


Blog: hjalte.nl - github.com

0 Likes

DominiqueBernardi5116
Contributor
Contributor

Thanks a lot, very helpfull

BR

0 Likes