Набросал я тут метод, правда не особо тестил, так что юзай осторожно.
третий параметр необязательный, поэтому в принципе можно в дальнейшем подменить им оригинальную con2str
X++:
static str 1000 con2Str_Arr(container c, str 10 sep = ',', container cType = conNull())
{
int idx = 0;
int len = conLen(c);
str 100 tmp;
str 1000 retStr;
SysDictType dictType;
ExtendedTypeId extTypeId;
int i;
str arr2str()
{
str ret;
;
dictType.setValue(conPeek(c,idx));
for (i = 1; i <= dictType.arraySize(); i++)
{
ret += ret ? ',' : '<';
ret += dictType.getValue(i);
}
ret += '>';
return ret;
}
;
while (idx < len)
{
idx += 1;
if (retStr)
retStr += sep;
tmp = conPeek(c,idx);
if (cType)
{
extTypeId = conPeek(cType, idx);
if (extTypeId)
{
dictType = new SysDictType(extTypeId);
if (dictType.arraySize() > 1)
tmp = arr2str();
}
}
retStr += tmp;
}
return retStr;
}
использовать, получается, вот так:
X++:
static void Job87(Args _args)
{
Dimension dim;
container con;
;
dim[1] = "dim123";
dim[2] = "dim321";
dim[3] = "dim333";
con = [1, "2", dim];
info(con2str_Arr(con));
info(con2str_Arr(con, ',', [0, 0, extendedTypeNum(Dimension)]));
}