Deleting ASideFace with Status kASideDefault makes Inventor crash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to write a macro who will delete the flatpattern and make a new one, where the user is asked to pick a face to be the ASide (or base face).
Doing this requires the ASideDefinition to be deleted first.
But I noticed some weird behavior with the ASideDefinition.
On the first creation of the ASide (manually doing it to test it, thus not via vba yet) it gets the Status: 106243 which is kASideUpToDate (Description: The A-Side face is specified and up-to-date). (I get the Status via vba)
When I delete the ASide and define it again it now gets the Status: 106241 which is kASideDefault (Description: The A-Side face is determined by Inventor).
If it has the Status kASideUpToDate the following code is executed without any problem:
oCompDef.ASideDefinitions(1).Delete
If is has the Status kASideDefault Inventor crashes on executing the code above.
So I actually have 2 questions:
- Why does Inventor crash?
- Why does the Status change on recreation of the ASide?
(I found the description of the status in the help: https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ASideFaceStatusEnum)
Thanks in advance!
Dominiek