Wrote a script to automate and regularize my release of engineering orders. Pops up a form with the files on the order listed and various info to check before releasing, you enter your password, and it then promotes them all automatically with a common history message, notifies specific people, and converts to PDF/STEP as applicable.
Worked nice for the past four months on the PC that I got in May. But then PDM and Win11 decided they didn't want to play nice together, and the only solution we could find (after similar problems on two other new laptops) was to revert to Win10.
And now, despite my password working fine for logging in to PDM or releasing the files manually the old fashioned way via Change State on the context menu (transition requires authentication), the script fails at the ChangeState3 command.
This is in a script I wrote in Visual Studio in VB.Net.
What else I've done:
- validated logins in the Admin panel
- tried my previous password
- changed my password
- tried ChangeState2 and ChangeState
- created a simple script using the ChangeStateX commands in Excel VBA
- tried while on VPN and on LAN
- tried talking to the VAR about it (yeah, go ahead, laugh)
Any ideas?
PDM: ChangeState3 Not Accepting Pwd After Win10 Reversion
Re: PDM: ChangeState3 Not Accepting Pwd After Win10 Reversion
Tried using loginex instead of loginauto. Which worked perfectly.
I mean, apart from having to hard code my password into the script. Small drawback there.
EDIT: which drawback I solved by loginex'ing by using environ("username") for the userid, and the password I already had for ChangeState3.
Works, but I have no idea why loginauto had worked fine for several months, unless it's something that actually worked better in Win11.
I mean, apart from having to hard code my password into the script. Small drawback there.
EDIT: which drawback I solved by loginex'ing by using environ("username") for the userid, and the password I already had for ChangeState3.
Works, but I have no idea why loginauto had worked fine for several months, unless it's something that actually worked better in Win11.
Re: PDM: ChangeState3 Not Accepting Pwd After Win10 Reversion
windows11 has a heavily reworked explorer.exe pdm is half broken with some of the latest updates from MS and they are supposedly working with SW to fix it. could be related to your case .
Re: PDM: ChangeState3 Not Accepting Pwd After Win10 Reversion
When using VB.NET or c# in Visual Studio, make sure that your referenced solidworks DLLs have the 'Embed Interop Types' set to 'False'. Also, be sure that, within your project properties, the option 'Prefer 32-bit' is not checked.
I've found these two things account for 95% of my headaches when starting new projects and I forget to change the defaults to these settings.
I've found these two things account for 95% of my headaches when starting new projects and I forget to change the defaults to these settings.