K
K
kalapanga2017-07-06 10:43:27
Delphi
kalapanga, 2017-07-06 10:43:27

Why does an error occur when starting external processing 1C through OLE?

There is a task from a program in Delphi through OLE to connect to the 1C database and start external processing. I connect using V83.Application. The connection is created, the processing is loaded, the desired function is launched. But in it there is a completely incomprehensible error to me. The function is located in the external processing object module. Here is the function itself (I threw out everything superfluous, the error is reproduced):

Функция СтартЗагрузки(парНастройки) Экспорт
  ФайлНастройки = Новый Файл(парНастройки);
  Если Не ФайлНастройки.Существует() Тогда
    Возврат "Файл не существует";
  КонецЕсли;
  Возврат "Ок!";
КонецФункции

A string with the full file name is passed to parSettings.
I get this error:
{ExternalProcessing.MyProcessing.ObjectModule(30)}:
Value is not an object type value (Exists)
What am I doing wrong?
Checked the type of the FileSettings variable. Expected "File", but it turned out to be "String". That there is no method is not surprising. But why String?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2017-07-06
@kalapanga

FileSettings by any chance not a processing form prop with string type?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question