chris754 Posted February 18, 2013 Report Share Posted February 18, 2013 (edited) Hi all, First time poster. I have been trying to create a new class in LV via scripting. I can successfully create the class, and add private data members to that class. However, when I try to creat accessor methods the unbundle feature is broken. I can fix this by opening the priavte data control and saving it. Any ideas how to fix this problem? I have attached my code. I have tried saving the control a number of ways, as well as the class, but can't seem to make it work. Thanks for any insight. Let me know if you have any questions. Chris Class Wizard.zip Edited February 18, 2013 by chris754 1 Quote Link to comment
Yair Posted February 19, 2013 Report Share Posted February 19, 2013 I didn't look at the code, but I'm guessing that this is the only way (because LV needs the class to be saved for some reason). If you look at the UI, you will see the same thing - you can't create accessors before you save the class. Quote Link to comment
chris754 Posted February 20, 2013 Author Report Share Posted February 20, 2013 Thanks for the response. I do save the class (programmatically), but I guess that isn't good enough for LabVIEW? Quote Link to comment
todd Posted February 20, 2013 Report Share Posted February 20, 2013 Perhaps add the class to the project? You could also look at the source for one of the Actor Framework Message Makers: https://decibel.ni.com/content/thread/13809 https://decibel.ni.com/content/docs/DOC-25451 Quote Link to comment
chris754 Posted February 21, 2013 Author Report Share Posted February 21, 2013 Thanks Todd. I can't look at AFMM because I use 2011 currently and it's built in 2012. I will give adding it a project a try. Quote Link to comment
chris754 Posted February 21, 2013 Author Report Share Posted February 21, 2013 Unfortuantely adding it to a project does not seem to fix the problem. Quote Link to comment
todd Posted February 21, 2013 Report Share Posted February 21, 2013 (edited) <p>Since the version under your avatar says 2011, I provided links to the 2011 version.</p> <p>And the first link is to a rar file. No need to install anything else.</p> Edited February 21, 2013 by todd Quote Link to comment
chris754 Posted February 22, 2013 Author Report Share Posted February 22, 2013 I missed the rar file. Seems like they are basically doing what I am doing, with the exception of using a copy/paste. Not sure if that will make a difference. Thus far no luck . Quote Link to comment
chris754 Posted February 25, 2013 Author Report Share Posted February 25, 2013 Figured it out! The copy/paste method works, weird that adding a directly to the cluster does not work. But I create a separate cluster and paste over the existing private data cluster and it does work. Quote Link to comment
kingcobraninja Posted February 24, 2017 Report Share Posted February 24, 2017 I'm interested in doing this and running into the same problem. What do you mean when you say 'paste over'? Ctl.Replace? Ctl.DataOp.PasteData? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.