How i can detect if a node is selected via plugin interface?

want to get the id paths of selected nodes. but how? couldnt find the info on the plugin specs page.


to move the solution from skype to the forum:
either IHDEHost.NodeSelectionChanged event for the INode2
or IHDEHost.GetXMLSnippetFromSelection method to receive the xml

thx woei, so far.

as a beginner im struggling with the concept of events in csharp, respectively the syntax to catch them.

found this:

and this:

dont really get it :(

something like this:

public class MyPlugin: : IPluginEvaluate, IPartImportsSatisfiedNotification
  public IHDEHost FHDEHost;

  private INode2[]() FSelection; //for storing the selection

  public void OnImportsSatisfied() //called on creation
    FHDEHost.NodeSelectionChanged += delegate(object sender, NodeSelectionEventArgs e)
	FSelection = e.Nodes; 

so each time the event is raised, that delegate is executed, which is simply saving the node selection.

thanks a lot woeishi.

still dont understand it in depth, but i got it working.

here is the plugin for those interested. (7.3 kB)