Jump to content

Get VI ref from subpanel


eberaud

Recommended Posts

Is there a way to retrieve the reference of the VI inserted in a subpanel? I'm writing a code that takes a "parent" VI ref, and then scan through all its splitters, panes, and subpanels, and now I'd like to retrieve some infos from the VIs loaded inside the subpanels...

 

Cheers

Link to comment

Thanks for the tip, I really appreciate it. For some reasons, since my early days as a LV developer I've had the impression that people wait for the SP1 because of potential bugs when a new version is released. But maybe that is not justified anymore?

Link to comment

I still think it is justified to wait for SPs and do tests before switching, however the last two releases were focused on fixing bugs and improving stability (2014 + 2015 afaik), with less "big" features like the Actor Framework in 2013. Compared to 2011, 2015 seems to be much more stable at least on my machine (working with a classes is no longer a reason to perform suicide, even with properties :blink:).
 
Being in the club 2011 too, we'll finally move to 2015 by the end of this year (and upgrade to SP1 once it is available). The performance improvement and, as Yair pointed out, the new edit-time features are worth it.

Link to comment

 I've had the impression that people wait for the SP1

 

Some people wait for the SP releases. It's certainly less likely to have new bugs, as they rarely have new features, but .0 releases are not exactly hotbeds of crashes automatically. I know I used 7.0 for years and was perfectly happy with it. I suppose depends on how sensitive you are to perceived potential bugs, but I don't have any actual data about the stability of .0 and .1 releases. I actually generally try to avoid upgrading if possible, because it's a hassle and can make project management a pain.

Link to comment

Its worth pointing out that the property you're referring to seems to return a single VI reference for any subpanel (at least in 2013). That is, if you read it you'll always see 0x00111111 even if you just passed in 0x00222222 or changed it to 0x00333333. This is fine-- you can still figure out which VI was inserted, but don't close that reference.

Link to comment

Its worth pointing out that the property you're referring to seems to return a single VI reference for any subpanel (at least in 2013). That is, if you read it you'll always see 0x00111111 even if you just passed in 0x00222222 or changed it to 0x00333333. This is fine-- you can still figure out which VI was inserted, but don't close that reference.

Honestly I think I'd prefer the function work in this manner rather than opening a new reference to the VI that I then need to close each time.  I wouldn't expect a function like this to open a new reference, but rather just return the reference it already has, similar to other property nodes that return a reference to something already open.

Link to comment

its kind of hard to describe so I'm posting a picture:

post-52313-0-06321800-1441729604.png

 

So the refnums are in fact different for all of the wires, but if you close the reference you get out of the inserted VI property, bad things happen. In this case, for example, the first VI never shows up past the first run and if you try to open that VI's front panel it points you at the subpanel, even when the main VI is stopped. Weird stuff.

Link to comment

Thanks for the tip, I really appreciate it. For some reasons, since my early days as a LV developer I've had the impression that people wait for the SP1 because of potential bugs when a new version is released. But maybe that is not justified anymore?

 

Nah, go for it. Think of LV2015 as LabVIEW 8.6.1 SP13.

  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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