My Table Actions Hang

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8
I don't know if this is a settings issue or not, but the problems I'm getting are with table action blocks in ProjectMaker. It's so odd, because I'll make a project in ProjectMaker that runs so good, but then it all goes to $hit. I've suspected it because of the file sizes I'm using, but that seems to be hit or miss because it sometimes runs big lists with ease then stop working, and when I test with smaller files it still doesn't work.

What I'm saying is I have to use Task Manager to shut it all down because PM hangs forever.

It's just my table blocks, as far as error logs I don't have much to go on because I have to use Task Manager to shut it all down without a report.

I have plenty of memory, strong i7 processor etc, is there something in my settings I can adjust to using more resources I should know about?

Thanks, sorry for being such as slow learning noob hehe :-)
 

jose

Новичок
Регистрация
28.03.2019
Сообщения
6
Благодарностей
0
Баллы
1
are you selecting the right delimeter so that PM is able to correctly load the data?
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
When we face that problem, we split text or tables into smaler files.
 
  • Спасибо
Реакции: nycdude

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
You will need two variables:
1. outputDir - The destination of your splited files, remember, the outputdir must end with "\"
2. bigFile - The big file who you want to split

Код:
//large files will receive a memmory error, split it
string directory = project.Variables["outputDir"].Value; //ex.: C:\temp\splitfiles\ << need this last "\"!
System.IO.Directory.CreateDirectory(directory);
int lines = 0;
int files = 1;
string line;
System.IO.StreamWriter swWriter = new System.IO.StreamWriter(directory+"file.txt");
System.IO.StreamReader swReader = new System.IO.StreamReader(project.Variables["bigFile"].Value);
while ((line = swReader.ReadLine()) != null)
{
  swWriter.WriteLine(line);
  lines++;

  if (lines >= 500 )
  {
  swWriter.Close();
  swWriter = null;
  swWriter = new System.IO.StreamWriter(directory+"file" + files + ".txt"); //splited files
  files++;
  lines = 0;
  }
}

swReader.Close();
swWriter.Close();
 
  • Спасибо
Реакции: nycdude

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8
You will need two variables:
1. outputDir - The destination of your splited files, remember, the outputdir must end with "\"
2. bigFile - The big file who you want to split

Код:
//large files will receive a memmory error, split it
string directory = project.Variables["outputDir"].Value; //ex.: C:\temp\splitfiles\ << need this last "\"!
System.IO.Directory.CreateDirectory(directory);
int lines = 0;
int files = 1;
string line;
System.IO.StreamWriter swWriter = new System.IO.StreamWriter(directory+"file.txt");
System.IO.StreamReader swReader = new System.IO.StreamReader(project.Variables["bigFile"].Value);
while ((line = swReader.ReadLine()) != null)
{
  swWriter.WriteLine(line);
  lines++;

  if (lines >= 500 )
  {
  swWriter.Close();
  swWriter = null;
  swWriter = new System.IO.StreamWriter(directory+"file" + files + ".txt"); //splited files
  files++;
  lines = 0;
  }
}

swReader.Close();
swWriter.Close();
Will definitely give this try, thanks man.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)