Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic Solid renaming

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
DominiqueBernardi5116
401 Views, 2 Replies

Ilogic Solid renaming

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

2 REPLIES 2
Message 2 of 3

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

Message 3 of 3

Thanks a lot, very helpfull

BR

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report