Jump to content

Chris Cilino

Members
  • Posts

    27
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Chris Cilino

  1.  What would be very useful too is a way to visit every element in the tree.  

     

    Hey MarcCG,

    Thanks for the props! It's kinda funny. I've created some "hidden VIs" for my own purposes and one of them is to return an array of references to each node in the tree. In effect I flatten the hierarchy into an array so that you can touch every element. After install, the vi is located at

    ..vi.lib_ApplicationToolsContainersContainersContainerTestsTesting UtilitiesReturnEntireHierachyofContainers.vi

    Have a look at JSON LabVIEW in the CR, as it is uses another container-like structure so might be similar (or not, as I haven’t looked at your code).  Is your Container by-ref or by-value?  Looks like by-ref as you have “Create”, “Destroy” and “Copy” methods.

     

    Hey drjdpowell

    The Containers are by-reference. I didn't want to create copies of Containers in the tree so I store references to children in parents.

  2. Well.... here it goes. This is my first LAVA post and I'm pumped! Figured I'd start out by asking for ya'lls (yes I'm from Texas) opinion on a side project I've had in the works for a while. I've developed in LabVIEW for just about a decade, even before my career at NI, and I've run into cases where I wished the array shared some of the characteristics of the cluster and the cluster had some attributes of the array. For example, I wish I was able to name and index my array elements by name like you can with the cluster while also not having to hard code that name on the block diagram with something like an unbundle. Almost like a dynamic unbundle by name... or something like that.

     

    So I've put together something I call the LabVIEW container that has the "dynamic-ness" of an array and the hierarchy mixed type named data "feel" of the cluster. It also behaves like a tree because of the "One parent - Many child" model. 

     

    Here's a super short 5 minute video describing the concept and demonstrating a functional prototype. I've also created a community document that goes into much more detail and from which you can, if you so desire (  :yes: ), download the Container and give it a spin.

     

    I'm still doing a TON of cleaning under the hood, and adding things like VI documentation at the moment, but I'd like to get ya'lls feedback on the usefulness of the idea and thoughts on the API.

     

    This is something I'm really excited about and I hope that it benefits the LabVIEW community.

     

    Thanks ya'll!!!!

     

    Chris

×
×
  • Create New...

Important Information

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