Hello,
All you need to do is to get the node you want that property set for. Here is an example for a current node:
CMS.TreeEngine.TreeNode tn = TreeHelper.SelectSingleNode(CMSContext.CurrentDocument.NodeID);
tn.SetValue("DocumentMenuItemHideInNavigation", false);
tn.Update();
Best regards,
Jan Hermann