AnsweredAssumed Answered

Can file open listener immediately unsuppress in the model tree?

Question asked by Stephen Jones on Oct 10, 2019
Latest reply on Oct 17, 2019 by Artem Taturevych

I'm trying to 'fix' some squirrelly data in our PDM system (which is NOT EPDM) where some assemblies don't have every link in the PDM to their non-suppressed components.


Here is what I have written (in c#):  A FilePreOpenNotify listener which I use to see what the assembly thinks it should have, and compare that to what is in the directory that contains the files to be used in the assembly.  If they aren't in the directory, add them to a stack.


A FilePostOpenNotify listener (I've also tried an idle listener) that unsuppresses the components.  


Our PDM system we are using is 'smart' enough to retrieve something that we unsuppress that isn't in the directory it opens from...but when I try to unsuppress the component within the assembly after it is open, nothing happens.  


If I close and reopen the assembly, the missing component is resolved and added to the workspace.


If I try to AUTOMATE the close of the assembly (not to mention the re-open) - the action makes SolidWorks freeze, I am assuming because the PDM system is intervening and reopening, but I can't tell for sure.


Has anyone seen anything like this before?  Thoughts?