As you can see I made it’s a filter that will add notes to any object that is piped through it.

The first line makes sure that the object is wrapped in an MshObject. As it turns out, for performance reasons, some objects aren’t immediately wrapped by an MshObject. I want to be sure that the object is wrapped by one so I cast it to MshObject. To tell you the truth, in the current build my filter seems to work fine without this line. However, there have been bugfixes around this so I’ll keep this line around to be sure that it works with the last public drop. The next line is self explanatory. It creates an MshNoteProperty object, passing the constructor the name of the note and the value of that note. Then we add that note to the MshObject, using that MshObject property I mentioned previously. And finally the object is returned. That way we can pipe an object through several AddNote filters to add more than one note.