Jump to content

From Block Diagram to Front panel


Sharon_

Recommended Posts

Hi,

I am new to Labview. I would like to know whether it is possible to place objects programmatically.lightbulb.gif

For instance, assume that there is variable 'a'. If the value of a is 5 , I need to place 5 ring objects on front panel.If it is 6....6 objects on the front panel.frusty.gif

Thanks for your time..!!!

-Sharon

Link to comment

You'll need to use scripting to create controls at run-time - unless there's an upper limit to how many you'll need. If that's the case, you can hide/show controls as you need. Either way, that page has a few examples to show you how scripting works.

Hi Asbo,

Thanks for the reply. I will try scripting to generate some objects.

Thanks and regards,

Sharon

Link to comment

Hi Asbo,

Thanks for the reply. I will try scripting to generate some objects.

Sharon, it's important to note that you won't be able to build an executable with your scripted VI. This is fine if you're just making a tool to make development easier. If this is what you're doing, consider making it into a plugin for the JKI Right-Click Framework. There's more information to help you get started scripting here and here.

Link to comment

As was said before, you can't use scripting in an executable. If you know the upper limit to the number of objects you will need on your front panel the simplest approach would be to create that number of objects on the front panel and make them visible/invisible with property nodes in your program, depending on the value of your 'a' variable.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.