|
Hi Andrés!
Andres wrote:
But now I wanted to get the placement (i.e.
x and y) for an object in a graph, and I receive a marshalling error when I do
so (MEAny place (MEOop receiver)). I tried asking first for the diagrams, that
is ok, I get a list of diagrams. But anyway, using those diagrams as receiver
for place() give me the same error as when I use the actual objects (for
example, Button or Text) as receiver. Could somebody give me a hint on what is
needed to find out the x,y location coordinates?
|
Without seeing your code I would assume that you are
trying to pass the conceptual objects as parameters where as the API is
expecting the object representations. Try out the following piece of code with
the Watch Example in the Demo repository to see if you can get a list of all
object places in 2008Models diagram without any troubles:
using System;
using System.Net;
using System.IO;
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
public class APIClient
{
public static int
Main()
{
/// Set the variable and initialize
connection to MetaEdit+ API
MetaEditAPIPortTypeClient
meServer = new MetaEditAPIPortTypeClient();
/// Variable
holding "2008Models" graph's oid
MEOop wModels =
new MEOop();
wModels.areaID
= 22;
wModels.objectID
= 962;
/// Fetch the
diagrams for "2008Models"
MEOop[] diagrams = meServer.diagrams(wModels);
/// Fetch
object representations for first diagram
MEOop[]
objReprs = meServer.objectReprs(diagrams[0]);
/// Print out
the place for each object representation
foreach (MEOop
objRepr in objReprs)
{
Console.WriteLine("Place: " +
meServer.place(objRepr).meValue);
}
return 0;
}
}
If this does not clarify the situation, please send us
the problematic part of the code and we will look further.
With best regards,
Rise
|