Code Snippet:
//Fetch the graphic form, from the Server for a project called Samples, graphic form name: Sample2
string gfName = "Samples.Sample2";
DataElement de = DataElementEngine.NewDataElement(gfName);
//this indicates that, if the form does not exist in the current folder, it will search in other folders of the project, if not found, the server will search for an alternate match in other projects as well.
de.Status = DataElement.DataElementStatus.SEARCHFORALTERNATES;
DataElementCollection dec = DataElementEngine.NewDataElementCollection();
dec.Add(de);
MethodReturnInfo info = MyConnection.ReadDataElements(dec);
if (info.Success)
{
DataElementCollection returnDec = info.ReturnObject as DataElementCollection;
DataElement returnDe = returnDec[gfName] as DataElement;
GraphicObject go = returnDe.Value as GraphicObject;
//Load this form - NOTE: WILL ONLY WORK IN THE OPERATOR
MyApplication.OpenGraphicObject(go, GraphicObjectDialogType.ModalForm);
}
else
{
MessageBox.Show("An error occurred trying to retrieve graphic form");
}