Where to find Corner Overrides in API?

Where to find Corner Overrides in API?

W.Scott.Dempster
Enthusiast Enthusiast
364 Views
8 Replies
Message 1 of 9

Where to find Corner Overrides in API?

W.Scott.Dempster
Enthusiast
Enthusiast

I am writing a method that will adjust Corner Seams and Corner Overrides in Sheet Metal parts. Finding the Corner Seams collection is straight forward inside the SheetMetalComponentDefinition, however I am unable to find where in the Corner Overrides are.

 

Does anyone know where I should look? Attached is the picture in the UI which shows what features/parameters I am talking about.

 

WScottDempster_0-1747235513726.png

 

0 Likes
365 Views
8 Replies
Replies (8)
Message 2 of 9

WCrihfield
Mentor
Mentor

Hi @W.Scott.Dempster.  What version/year of Inventor are you using?  They have been making changes in the sheet metal area the last several years, so some features, abilities, options in that area may be new to one of the latest versions of Inventor.  Sometimes when a feature, ability, or option/setting is new, there may not be any way to access them through the API yet, but I don't know if that is the case here.  I am still using 2024.3.4, but searched within the 2026 online help area and did not find anything about those specifications.  I could find CornerFeatures, and CornerOptions, but not 'corner defaults' or 'corner overrides'.  It looks like we have had access to CornerOptions through Inventor's API since since version 2009.  They are used when defining FlangeFeature or ContourFlangeFeature type features in sheet metal parts.  It kind of looks like the new user interface tools let you specify something like a CornerOptions for each corner of a single flange feature, instead of one setting that effects all corners of the flange equally.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 9

W.Scott.Dempster
Enthusiast
Enthusiast

Inventor 2025, just upgraded from Inventor 2023. I don't know if this Corner feature is also in 2023, but it would make sense if it's indeed new and not yet supported. Thanks for the input.

0 Likes
Message 4 of 9

hollypapp65
Advocate
Advocate

They could be just corner features.

The new UI just group them together.

0 Likes
Message 5 of 9

WCrihfield
Mentor
Mentor

I don't think so.  I can do something very similar in Inventor 2024, even though the dialogs look a bit different, but it does not result in any additional features.  When done, I still just have the original 'Face' feature, then the one, regular Flange feature.  In that one Flange feature, I selected all 4 edges of the rectangular Face, to create all 4 flanges with one Flange feature.  While I have the Flange feature editing dialog open, I see the same 'glyphs' around the model, in all the same places, but do not have that additional area of settings in my main dialog.  However, if I click on one of those 'corner' glyphs, a small dialog shows near that glyph, labeled 'Corner Edit', and it contains several settings for editing that corner.  There is no standalone CornerFeature after making that modification though.  It is just an edit to/within that one FlangeFeature.  I just don't see any way to access that additional functionality or settings through Inventor's API.  In the API, I just see the standard options that we see on the 'Corner' tab of the FlangeFeature dialog...which I assume are the 'default' settings for all 'corners' that this feature creates.  But it seems like manually, we can override how each individual corner will be formed while actually creating the FlangeFeature, but I don't see how to do that same thing through the API.  So, if doing it entirely through the API, I would probably have to create individual CornerFeatures for each corner, if I needed to change how each corner was formed.  The result would be different though, because it would be multiple features in the model tree, vs just one feature in the model tree.  Below is a screen captured image from my computer, using the 2024.3.4 version.  In this instance, this was available while initially creating the first FlangeFeature, and was also still available while editing the FlangeFeature after the fact.  I was able to customize each corner a different way, without creating additional CornerFeature objects.  I don't know what else to say about that.  There has always been a lot more stuff we can do manually than we can do by code, and it will probably always be that way, because most people to most things manually, and those of us who are automating some of this stuff are the minority.  The manual ability will come first, then maybe we will get access to it through the API at some point after that, if there is enough interest in accessing it by code.

WCrihfield_0-1747326461032.png

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 6 of 9

WCrihfield
Mentor
Mentor

I did see one thing in the API that sounds suspiciously like it might have something to do with this, and that was the FlangeDefinition.RemoveOverrideWidthExtent method, but that does not sound like what we are looking for here.  I know that one of the results of editing corners is adjusting the flange widths, but we can also change the relief shape and relief size for each corner independently, which doesn't really have much to do with flange widths.  Plus, that is just for 'removing' something that is already there, and I don't see any other 'Set' type method or property that seems to have anything to do with 'corner overrides/edits'.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 7 of 9

hollypapp65
Advocate
Advocate

FlangeCorner-01.jpg

There is a Corner1 feature inside Flange1.
Maybe API can find Corner1?

0 Likes
Message 8 of 9

WCrihfield
Mentor
Mentor

Good question.  We do have the FlangeFeature.BendFeature property, which will give is a single BendFeature (not to be confused with the simpler Bend object).  The BendFeature object does not have any direct properties about any corners.  Then, if we dig down ingo the BendDefinition of that BendFeature, we still don't see any direct properties about corners.  Then if we dig even deeper into the BendDefinition's BendOptions (through the BendDefinition.BendOptions property), we see some settings about 'bend transition, bend relief shape, bend relief size, and such, but nothing about corners.

Now back to the FlangeFeature again, it does not have a direct property for a CornerFeature, like it had for its BendFeature.  And it does not seem to have any other direct properties which have anything to do with corners.  Then when we step down into the FlangeDefinition, we have the FlangeDefinition.CornerOptions property, which gives us a CornerOptions object, which is where the can set the 'default' specifications for corner relief location, shape, & size.  But that is just a single set of 'default' settings that apply to 'all' the corners that the feature creates, and does not offer us a way to specify unique 'overrides' for each individual corner.

When we select that browser node under the FlangeFeature in the model browser tree labeled 'Corner', it highlights all 4 corners which that feature created, not just one of them.  And there are not 4 of those nodes, which would mean one for each corner.  So, it apparently does not represent a single CornerFeature, or multiple CornerFeatures, according to the API, because when I inspect the total number of CornerFeatures in the SheetMetalFeatures.CornerFeatures.Count, there are zero, not even one, after that FlangeFeature has been created, and the document updated.  It seems to represent a entry way to allow us to either apply individual edits/overrides to each corner directly, or reset all of those individual corner edits/overrides.  Generally speaking, pretty much every user interface tool will have a ControlDefinition, also known as 'commands' in some scenarios.  This is where its name is defined, the icons involved, and has the Execute method for running a block of code when it gets interacted with.  In this case, there are 3 such ControlDefinitions, whose names I will list below:

SheetMetalFlangeCornerResetCtxCmd
SheetMetalFlangeEditCtxCmd
SheetMetalFlangeCornerEditCtxCmd

The middle one there is the first that happens when we choose that 'Edit Corners' option in the context menu.  Then the last one in the list is the second to happen, just after that, but pretty much at the same time.  Then when we choose the 'Reset All Corners' option, it executes that first command listed there.

WCrihfield_0-1747401706416.png

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 9 of 9

WCrihfield
Mentor
Mentor

I had the order of those last two listed commands wrong at first, so I went back and corrected my statements after that list.  Another thing we can do here is go search for this in the 'Inventor Ideas' forum.  If someone else has already mentioned wanting to get access to this functionality through Inventor's API, then we can 'vote' for it, to increase its popularity.  Or, if we can't find any existing post in there about it, you can create a new 'Idea' post in there for this.  If you do create a new post for it in there, be sure to make the title as clear as possible, and include plenty of visual aids, like the images in this conversation, and a link to this conversation, for extra reference.  That way when folks are browsing Idea posts, there is something to catch their eye, so they will take the time to read it, and hopefully vote for it.  Some ideas get picked up and implemented pretty fast, especially if they are easy for them to implement, while others which may even have tons of votes may take years to get implemented.  So, you never know. 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes