01-18-2019 12:49 PM
Is there a simple way to display a class as the cluster on a front panel. To do member access is straight forward but that only gets you one member. What if I want to display the whole class as a cluster?
Thanks,
Norm
01-18-2019 01:19 PM
Why would you want to do that using LVOOP?
If you use a Library and a cluster you can do what you want to do.
The benefits of LVOOP over a Library is dynamic dispatching which mean you (and LV) doe not know what is actually in the class wire/control until run time.
Otherwise use an accessor method and resize for all elements and write those to a "Bundle" that drives a cluster on the FP.
Ben
01-18-2019 02:53 PM - edited 01-18-2019 02:59 PM
Why are the accessor elements in alphabet order and the bundle in cluster order? Yes I know I can clean it up. I was hoping there was an easier way.
01-18-2019 03:05 PM
@Viper wrote:
Why are the accessor elements in alphabet order and the bundle in cluster order? Yes I know I can clean it up. I was hoping there was an easier way.
It appears you copied out the class definition to create the type you are using for the Bundle by Name.
Quick tip that may be helpful
Drop a "Bundle" (not a bundle by name) and just wire from the accessors to the bundle and let the bundle adapt.
Right-click the top middle of the Bundle and do a "Create constant". THe new constant will get it definition from what you had wired.
Make the contant a type def ( you know how to do that)
Replace the instance on the diagram with the type def version.
Right-click the "Bundle and select "Replace" then navigate the "Bundle By Name".
I hope that helps somebody,
Ben
01-21-2019 09:29 AM
It would be possible to create an XNode that takes any object as an input, and outputs a cluster of its properties. But it would be a lot of work, and I really don't see the point.