Hi @martin.djignagard. Were all of the instance properties assigned to all of the occurrences while the 'main/top' assembly was the 'active' document, or were some of them assigned to sub components while other sub assemblies were the active document. Knowing this detail is important, because 'instance' properties depend on whichever Document was currently the 'active' (visibly showing on your screen at the time, for editing), and I believe they may also depend on which ModelState was 'active' at the moment the instance property was created.
Also, there are two different ways to recursively iterate over multiple levels of component occurrences in an assembly, and each way can change how things work. When using the ComponentOccurrence.SubOccurrences property to access lower level occurrences, the lineage or association with the top/main assembly is preserved, meaning some types of changes made will be made from the perspective of the top/main assembly, instead of the individual occurrence definitions being iterated through. However, when using ComponentOccurrence.Definition.Occurrences to iterate through them, it is actually stepping down into the 'definition' of the sub assembly, instead of just another layer of sub components of the top/main assembly, and because of this, most/all changes made will effect the individual component definitions (and files where those definitions are saved) for all those occurrences. Which way is best for a specific situation depends on your goals, what you are planning on doing to/with each occurrence, and where you want the changes to be saved.
So, if all instance properties were assigned to all sub occurrences while the main/top assembly was active, and the same ModelState of that main/top assembly was also active during all instance property assignments, then the original way of iterating the sub occurrences (using SubOccurrrences property) would be best, but if instance properties were assigned while other sub assemblies were active, then they will only be found again when that sub assembly's definition is being worked within again, so stepping down through the occurrences by way of their definitions would be necessary. And if my theory is correct about the same ModelState that was active when the instance assignments were made needing to be active again to find those instance properties, then there may need to be some ModelState activations included in the process also, but I am not sure.
Wesley Crihfield

(Not an Autodesk Employee)