Hi Rafal, I've tried you solution and I don't know why is no working, I think I'm doing correctly, can you check it out?
public static List<KeyValuePair<int, Punto>> Puntos(List<int> IDs_Robot)
{
// I generate the returning object of the method.
List<KeyValuePair<int, Punto>> elemento_retorno = new List<KeyValuePair<int, Punto>>();
// I generate all selections requiered.
RobotSelection seleccion_nodos = Datos.Estructura.Selections.Create(IRobotObjectType.I_OT_NODE);
seleccion_nodos.Clear();
foreach (int id in IDs_Robot) seleccion_nodos.AddOne(id);
// I generate the query.
RobotResultQueryParams tabla = Datos.Aplicacion.CmpntFactory.Create(IRobotComponentType.I_CT_RESULT_QUERY_PARAMS);
RobotResultRowSet iterador = new RobotResultRowSet();
tabla.Selection.Set(IRobotObjectType.I_OT_NODE, seleccion_nodos);
tabla.SetParam(IRobotResultParamType.I_RPT_NODE, 1);
tabla.SetParam(IRobotResultParamType.I_RPT_RESULT_POINT_COORDINATES, 1);
tabla.ResultIds.SetSize(1);
tabla.ResultIds.Set(1, Convert.ToInt32(IRobotFeResultType.I_FRT_DETAILED_NXX));
Datos.Estructura.Results.Query(tabla, iterador);
bool hay_tabla = iterador.MoveFirst();
while (hay_tabla == true)
{
// I get all values of the row.
int nodo = iterador.CurrentRow.GetParam(IRobotResultParamType.I_RPT_NODE);
double[] coords = iterador.CurrentRow.GetParam(IRobotResultParamType.I_RPT_RESULT_POINT_COORDINATES) as double[];
string hola = iterador.CurrentRow.GetParam(IRobotResultParamType.I_RPT_RESULT_POINT_COORDINATES).ToString();
Punto punto = new Punto(coords);
// I add a new entry.
elemento_retorno.Add(new KeyValuePair<int, Punto>(1, punto));
hay_tabla = iterador.MoveNext();
}
// I return the requiered object
return elemento_retorno;
}
PD: Datos.Estructura represents a RobotStructure object and Datos.Aplicacion represents a RobotApplication object