Programatically select/ deselect an object

Hello,

quick question.
How can I programatically select/deselect an object which belongs to the GoView.Document ?
Thanks very much in advance
Susan

Hey suzi walter helped me with something similar like this before.


[code]
foreach (GoObject obj in this.goView1.Document) { MatterNode nm = obj as MatterNode; ContactNode nc = obj as ContactNode; if (nm != null) { DataRow dr = nm.UserObject as DataRow; DataRow[] nr = MainData.Instance.ds.Tables["nodes"].Select("sysid = '" + (string)dr["sysid"] + "'"); DataRow node = nr[0]; node["Xaxis"] = nm.SelectionObject.Position.X;
node["Yaxis"] = nm.SelectionObject.Position.Y;
}

if (nc != null){
DataRow dr = nc.UserObject as DataRow;
DataRow[] nr = MainData.Instance.ds.Tables[“nodes”].Select(" sysid = ‘" + (string)dr[“sysid”] + "’");
DataRow node = nr[0];
node[“Xaxis”] = nc.SelectionObject.Position.X;
node[“Yaxis”] = nc.SelectionObject.Position.Y;
}

}

[/code]
so this is my save diagram code where I go through every type of node in the go document and then I save the position of it accordingly.

Just Add or Remove the object from the GoView.Selection.

I see what you mean now, I was way off. I should wait for walter’s replies first.

Thanks, but don’t feel like you need to stay quiet. I think we all appreciate it when everyone helps each other. And you learn more by trying to come up with answers.

Thanks very much to both of you.

Susan