GLAVCVS Posted 8 hours ago Posted 8 hours ago 7 hours ago, Paul Li said: @GLAVCVS BTW: I didn't see any changes to your original code. For example I still see the lines using *PS-TOUT* I've tried it on a couple of Windows 10 Pro OS computers running AutoCAD 2021, 2023 & 2027 one at a time and not multiple sessions. Upon further testing the Select Files window can be unstuck by toggling to the Edge browser making that active and then toggling back to AutoCAD. The problem still occurs even when the Edge browser is not running. But as long as I launch the Edge browser (when it's not already running) then the Select Files window would free up to function as designed. This problem does not occur on the single Windows 11 OS computer I tested this on. I've edited the code again, and it seems to have worked this time. Quote
Paul Li Posted 4 hours ago Author Posted 4 hours ago @GLAVCVS Thanks for updating the code. Unfortunately, it still freezes up on me with AutoCAD on Win 10. I'll have to use the method to make either Edge on one computer or Outlook on another computer current to unfreeze the Select Files window. But on both Win 10 & Win 11, I'll encounter another problem. After loading the code on the current dwg and then I open another dwg and run the code there I would encounter problems. The error would read: Command: (pl:getfiledps "Hola" "c:\\" "dwg" 1) ("__ERROR__ The property 'FileName' cannot be found on this object. Verify that the property exists and can be set.") Quote
GLAVCVS Posted 1 hour ago Posted 1 hour ago 2 hours ago, Paul Li said: @GLAVCVS Thanks for updating the code. Unfortunately, it still freezes up on me with AutoCAD on Win 10. I'll have to use the method to make either Edge on one computer or Outlook on another computer current to unfreeze the Select Files window. But on both Win 10 & Win 11, I'll encounter another problem. After loading the code on the current dwg and then I open another dwg and run the code there I would encounter problems. The error would read: Command: (pl:getfiledps "Hola" "c:\\" "dwg" 1) ("__ERROR__ The property 'FileName' cannot be found on this object. Verify that the property exists and can be set.") The last line of code (pl:getfiledps "Hola" "c:\\" "dwg" 1) is for testing purposes and should not be loaded at startup. Comment it out, save the changes, and open a new drawing to reload the code. Once the file has loaded, you can execute (pl:getfiledps "Hola" "c:\\" "dwg" 1). The reason for this is that PowerShell runs asynchronously, and `pl:getfiledps` might execute before the PowerShell instance is available. Quote
Paul Li Posted 48 minutes ago Author Posted 48 minutes ago @GLAVCVSI just tried commenting out that line as you recommended but still no joy. The freezing up now also occurs on the Win 11 OS. Even after I unfreeze the Select Files window, I still cannot Cancel out but I must make a file selection to dismiss the window. The behavior just seems very unstable with a persistent powershell setup at least on the systems I tested at my end. But thanks for your feedback & code revisions. Perhaps others here can use this faster alternative if it's stable running the code this way on their systems. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.