Update: I'm still waiting on API support to get back to me, meanwhile I have given up on this issue. I could not find anything wrong with my code and I think it might be a Solidworks bug.
Problem: ActivateDoc3 does not behave as expected in some circumstances...
Hi all, I have a swAddin that runs code on the save event of certain assemblies.
During the execution of this code, in some circumstances a drawing document is automatically created for this assembly.
These files do have the same name (ex. 12345.sldasm and 12345.slddrw). I have read and understood the remarks to this regard in the documentation and have tried the suggested solutions, but I still get inconsistent behavior.
One thing to note, is that my code will only create the drawing if it does not yet exist, if it already exists there is no problem activating between the two. The problem only arises when the drawing is newly created (I did make sure I saved it to the disk before trying to activate it by its title).
Things I tried:
- Sending in the file extension along with the full path
- Using the different [i]ActivateDoc[1,2,3] methods.
- Using different options in the rebuild arguments
- Enabling visible file extensions in system OS
My machine has windows7 64bit and I’m running solidworks 2012 sp2.0.
Thanks in advance,