Importing EEGlab dataset by a script

Hi all,

I am using a script to import my EEG data (.set), and here is the code:

bst_process('CallProcess', 'process_import_data_raw', [], [], ...
    'subjectname', SubjectName, ...
    'datafile', {RawFile, 'EEG-EEGLAB'}, ...
    'channelreplace', 0, ...
    'channelalign', 0, ...
    'evtmode', 'value');

However, the file I got is quite different from the file that I manually imported. The steps are following:
condition selection:no >> import channel file:10>> Import eeg-eeglab file: just get all epoch>> Import

Could I ask how to understand each relevant parameter? I hope my code will get the same results as a manual import.

I recommend you ask Brainstorm to create a script based on the steps you have taken manually: this can be done by creating a process pipeline and then having Brainstorm generate the corresponding script.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

It seems, the issue is that you are performing two different actions: in the GUI you are clicking on the option Import MEG/EEG, but the shared script is for the process Create link to raw file. To have the same results as with import from the GUI, use the process Import > Import recordings > Import MEG/EEG existing epochs.

Thanks for your help!!!
I have realised different actions.

Thanks for your help!!!
I have realised different actions.
However, it is still confusing to me that all my eeglab data have been separated into 2-s epochs (around 150) with no consistent epoch name. May I ask wether it is possible to automatically import all epochs in codes?

Please share the entire window with the import options