I occasionally have an issue where derived features don't update, even though the part I'm deriving from is updated. When I click "Edit Derived Part", it automatically updates.
This causes a lot of problems in large assemblies, since it's not obvious what has gone wrong.
Example (find files in attachment):
The code in DeriveUpdate_Assy.iam:
Parameter("BaseComponent", "Width") = Width
Parameter("BaseComponent", "Length") = Length
InventorVb.DocumentUpdate()
When I run this code, following happens:
If I click on "Edit Derived Part" in DeriveUpdate_Derive2.ipt it instantly updates the derived planes correctly.
If I change Length & Width manually in User Parameters inside DeriveUpdate_Base.ipt, everything is always updated correctly. The issue only occurs when modifying the parameters through iLogic.
How do I fix this? Is there simply an Inventor setting that will solve it? Is there some way to force the Derived Part feature to update from code?
Help is greatly appreciated!
We're currently on Inventor 2021.4.1. We'll soon update to 2023, but my testing showed that this issue exists there as well.
Correct I have seen this indeed too.
https://forums.autodesk.com/t5/inventor-forum/derived-parts-not-updating/m-p/12865449#M930738
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Hi @KenPalAlt. This is just an educated guess at this point, since I generally do not attempt to 'manage' derived referenced documents by code that much myself, but have you tried using the Rebuild2 method on the main assembly yet? It sounds like Inventor is not fully recognizing that some of those derived referenced documents need to be updated, so it is not doing that step automatically for you. You may need to force that step, one way, or another. The Rebuild2 method is like the Update2 method, but it ignores the documents' status of not needing to be updated, and does it anyways. Not always a good idea in a large assembly, for performance reasons, but can be manageable in smaller ones.
There is also the FileManager.RefreshAllDocuments method, but I am honestly not really familiar with using that one. This 'refresh' method sounds like it may cause all documents being held in memory to reflect what has actually been written to their files, rather than reflecting any changes that may only be held in memory so far, but I am not sure. If so, then you would have to save all the documents that your code has made changes to, before using that method. Just ideas to think about.
Wesley Crihfield
(Not an Autodesk Employee)
@WCrihfield
Thanks for the reply!
For good measure, I tried all of Update2, Rebuild2 and even RefreshAllDocuments (after saving files). Unfortunately, neither of them made a difference.
I've made an additional discovery about this issue, that allows for a workaround (see attachment);
After this, the derived planes in ilogicTest_DeriveUpdate_Derive2.ipt update correctly. If I stop deriving that solid, then the planes stop updating (but suppressing is allowed).
I feel like this gives some clue about the behaviour, but I don't know what to do with it.
The workaround is far from a good solution (as I need to create nonsensical solids, which will confuse the users), so I'm still looking for a better way to solve this.
hi.
i have been trying to fix this issue for some time now and stumbled upon this workaround.
i have not fully tested it but seems to work for my needs.
i am currently using it to force update when i am changing the derived part's material.
the basic idea is to get into every "DerivedPartComponent" with a foreach loop and switch one value 2 times, forcing it to update
partDocument.ComponentDefinition.ReferenceComponents.DerivedPartComponents.OfType<DerivedPartComponent>().ToList().ForEach(x =>
{
x.SuppressLinkToFile = !x.SuppressLinkToFile;
x.SuppressLinkToFile = !x.SuppressLinkToFile;
});
it is written in C# but should be easy to change into visual basic
i would love to here feedback on more use cases.
kind regards
Can't find what you're looking for? Ask the community or share your knowledge.