Access resources in sequencer

  • Software
  • Access resources in sequencer
Benjamin Solem

Posted on 21.09.2023 20:51

Hi,


How do I access the resources found in the sequencer? I want to access the systems and setup folders in a dynamic way in formulas.


I have tried to do it the way it is written in the excel writer without success.




I know that I can change the value for setup and data folder in the sequencer action, but how do I read the current value?


(By the way, I get a major error when i accidently tried to create the topic without topic title and had to rewrite everything, probably better if there is a warning instead of just breaking down.)


BR

Benjamin


Pika Kreča Šmid

Posted on 25.09.2023 07:57

Hello Benjamin,


thank you for reaching out to us.

Could you please tell us a little more about what exactly it is you are trying to do? Based on the current information we have, we are slightly confused as to why you would like to read the current Data and Setup folder name. A little more information would help us find the best solution to your problem.

If you would like to change the Setup file and/or the Data file you could use an if condition block and connect a ChangeDataFolder/ChangeSetupFolder block to it. In this block, you have three parameters; Name, Type, Value, and you need to add a value to the Value parameter. 



The best way to monitor which setup and data folder you are in is by creating Sequencer variables under the General Settings of the Sequencer. Define the name of the folder under the variable name, set the Data type to Text and insert the datafile path as the Default value. In this way, you would be able to monitor the files while in the sequence editor.

Once you run the Sequencer, you will have a window with the name of the sequence. In the upper left side of the DewesoftX window, right next to the Measure and Analyze tabs, you can find the name of the setup you are currently using. Lastly, if you equip the Display you are using in the Sequencer with an Input control widget, you can assign it to show Folder and filename. That way you can still see, which file you are currently located in.



Best regards

Benjamin Solem

Posted on 25.09.2023 09:07

Hi,


I already do basically that with the data folders as I am switching data folders during the measurement in the sequencer. My general issue is that I make the program (project, setup files and sequencer) on my computer and then push it to computers where Dewesoft is run both on single user installations and in public installation. Hence, the original setup and systems folder differ.


Today I have to update a few global variables where I store the several data and setup folders used during a single sequence. Additionally, I update the folders in "Files and folders". If I could utilize a short link to the "Default folders" in the same way as in the excel writer-plugin this would significantly reduce the amount of work and (!) the risk of all these manual inputs. Instead, I could just update the Default folders and call on those in the sequence with additional "suffixes" for my special folders where the suffixes would be the same, regardless of user.


As I can use the "ChangeSetupFolder" and "ChangeDataFolder" in the action block I doubt it would be difficult to just get the value of the current (or default)
setup or data folder. Just now, the tenth time looking, I found the IApp.GetSpecDir(<dir_type>) in the calculation blocks advanced functions. It will probably do what I need!


Benjamin

Pika Kreča Šmid

Posted on 25.09.2023 13:58

Hello Benjamin,


the IApp.GetSpecDir(<dir_type>) function should enable you to see the current path in which you are saving your Datafile and Setup. Using 4 as <dir_type> (DataDir) will output the path for the file in which you are saving the acquired data. Using number 5 (SetupDataDir) will output the path for the file that you are using to save your Setup files in and using number 10 will output the path for the file that you are using to save the Sequences.

You can then use the if function block to either continue the sequence, if the current data folder is the right one, or to change the data folder if the current folder is the wrong one

If it were ok for the users to change the paths, you could also use the Form block, similar to what this solution is doing. This would, however, mean that the user would have to define the paths each time the Sequence would start, so this might not be ideal in your case.


Best regards

Login to reply to this topic. If you don't have account yet, you can signup for free account .