adamLL Posted January 23 Share Posted January 23 Can get it to work in a quick sequence and in the command/alert box, but even a sequence with nothing else but "File.FolderSelectDialog()" doesn't trigger the dialog box to show up Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 23 Share Posted January 23 That function, and a few others, will only execute in the primary thread of DAQFactory which is the one that handles the user interface. It cannot be triggered from a secondary thread, i.e. a sequence running on its own (vs called as a function from the user interface). There are several reasons for this, one is related to how Windows does the user interface and the corresponding message pump. The other is that in general having some random popup appear that isn't triggered by a user interface action is usually bad user interface design, which is why we didn't implement ways around the first reason. You however, could implement it yourself using a flag and the OnPreDraw() or OnPostDraw() system events, which run in the user interface thread, but I would seriously recommend against it. Having a folder select popup just appear at random isn't going to work very well for the operator. If you need to have the operator select a folder before running some background rountine, then put the folderSelect command in the button as a Quick Sequence, and then start the sequence afterwards. Quote Link to comment Share on other sites More sharing options...
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.