plz give me
ClassDiagramNode’s attribute,operation’s text
it’s groupping
so i can’t save ClassDiagram’s attribute sections and load too
If you look at that example class’s Initialize method, you can see one way of setting up the information and customizing the appearance of a ClassDiagramNode.
You can programmatically access the GoObjects in each section by iterating over the Attributes property or over the Operations property. Each of those items will normally be instances of ClassDiagramNodeItem, so you can look at the .Text. Something like:
foreach (ClassDiagramNodeItem item in aNode.Attributes) {
… item.Text …
}
By the way, you might want to download the latest version of this example class:
http://www.nwoods.com/forum/forum_posts.asp?TID=1099
nugulang, I moved your post here, since it was a follow-on to this topic. But I guess you then deleted it?
I still don’t understand what you are trying to do and why you can’t do it.
Did you want to find all the attributes and operations in a node? Then you can do something like:
ClassDiagramNode aNode = goView1.Selection.Primary as ClassDiagramNode;
if (aNode != null) {
String msg = “Attributes:”;
foreach (ClassDiagramNodeItem item in aNode.Attributes) {
msg += "\n " + item.Text;
}
msg += “\nOperations:”;
foreach (ClassDiagramNodeItem item in aNode.Operations) {
msg += "\n " + item.Text;
}
MessageBox.Show(msg);
}
I’m Sorry
I writed it then i sucess
So i deleted it
you’r answer is good
Thanks, walter