Jump to content
News about the LabVIEW Wiki! Read more... ×
Sign in to follow this  

XNodes: RemoveXNode method and ReplaceSelf ability

Recommended Posts

The context help for the "RemoveXnode" method says "Removes the XNode from the diagram.  The contents of the diagram of the XNode are merged with the diagram"


However if you try it, it may or may not work.  That's because this method just calls the "ReplaceSelf" ability; so if an XNode doesn't have a "ReplaceSelf" ability, the "RemoveXnode" method will do nothing.

So if you want your XNode to work with the "RemoveXNode" method, you must create a "ReplaceSelf" ability.  Fortunately doing so is very trivial:  Your ReplaceSelf ability only has to call the "GenerateCode" Ability; like this:


Paul Cardinale

P.S. Note that the "ReplaceSelf" ability of some NI Xnodes doesn't work properly.  For instance if you call "RemoveXNode" on the "Match Regular Expression" function, it will make a mess, breaking the VI.

  • Like 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use.