Ilogic Solid renaming

Ilogic Solid renaming

DominiqueBernardi5116
Contributor Contributor
428 Views
2 Replies
Message 1 of 3

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
Accepted solutions (1)
429 Views
2 Replies
Replies (2)
Message 2 of 3

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
Message 3 of 3

DominiqueBernardi5116
Contributor
Contributor

Thanks a lot, very helpfull

BR

0 Likes