Folder Select Dialog doesn't work in sequences


adamLL

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.