I cannot make sense of this behavior so I’m not sure how to ask for help. While debugging, I’m calling ChangeState3 from an IEdmFile13. During that process something is causing PDM to try to register our other task add-in, again. I say again because the task add-in has already been registered. The program I’m debugging has nothing to do with the task add-in; they’re not even in the same solution and I’m not using any of the my libraries (other classes) from the add-in solution. The call does succeed though because the file does change state. I did this a bunch of times.
The dialog I get is:
image.png
followed by this one"
image.png
If you look closely you can see it has a ‘3’ at the end of the GUID number because it downloaded the add-in files again when I debug my project (that has nothing to do with pdm task add-in project)
I can change state through the vault view manually just fine.
This is a console app, not windows Form.
The transition(s) I’m calling in code do have some actions to set variables, but no execute task actions so they are not calling our task add-in.
I thought there was something wrong with my SW and PDM installation on my development machine (a VBox guest) so I did a clean uninstall and reinstalled SW and PDM from our admin image, like normal. Of course added the vault view back etc.
After doing that I noticed that my Projects’ reference to the EPDM.Interop.epdm was broken. Turns out previous installation of PDM was not in the same place as it is now in the C:\ProgramFiles\ directory, so I updated the reference to the new installation location and rebuilt. I don’t know if that has anything to do with it.
After fresh installation same behavior.
Just guessing now, I rebuilt my home brew task add-in project and updated the add-in files through the PDM Admin Tool. Then exited from pdm and restarted explorer.exe on my development machine. That made no difference again.
I cannot understand why calling ChangeState3 while debugging one project is causing PDM to try to register some other task add-in that’s already registered. Clearly I have something screwed up but I’m lost as to what or how to find it.
Side note, I tried ChangeState() (not 2 or 3) but that always throws an exception that the state ID doesn’t exist, whether I pass the state id as an int or the name as a string. I know that state id and name are good because they are in the dbo.Status table with Enabled = 1. ChangeState3 handles the state id just fine. Well, except PDM throws this darned error. There’s about 50k part numbers in my list to work through and using the API Search call for each one is slow so I really don’t want to sit here and click “OK” the whole time this runs.
I don’t recall if I ever tried simply calling ChangeState3 all by itself in a test program. I’ll go write a simple console app for that to see if it is the same.
about ready to quit and start
I’m open to any suggestions at this point.