Jump to content

Sub Panel Copy Does not Create a New Block Diagram Node


Recommended Posts

Question:

When you copy and paste a sub panel, or <CTL + Drag>, you do not get an associated node on the block diagram for the copied sub panel. Is this a bug .... or? :unsure:

At first I thought that this behavior precluded one from having more than one sub panel on a VI. :blink:

However, if you create additional sub panels from the pallete utility you do get a node for each sub panel created in this way. :yes:

... any thoughts?

A.L.

Link to comment

QUOTE(alukindo @ Apr 1 2007, 07:43 PM)

Question:

When you copy and paste a sub panel, or <CTL + Drag>, you do not get an associated node on the block diagram for the copied sub panel. Is this a bug .... or? :unsure:

At first I thought that this behavior precluded one from having more than one sub panel on a VI. :blink:

However, if you create additional sub panels from the pallete utility you do get a node for each sub panel created in this way. :yes:

... any thoughts?

A.L.

This is not a bug, really. It has to do with the fact that a SubPanel is really a control with no value. In order to use it, you need to use it's methods. Since a SubPanel has no data (a null Variant, actually, if I recall), NI has hidden the block diagram terminal (does it even own a Terminal in the GObject model?). When you drop a SubPanel from the palette, I presume that NI executes a little snippet of code (defined in the palette's MNU file) that causes the invoke node to appear. There is no such provision for executing a snippet during copy+paste operations. I know that this is not a great reason that LabVIEW doesn't work the way that you'd expect, but that's how (I believe) everything works.

Link to comment

QUOTE(Jim Kring @ Apr 1 2007, 10:18 PM)

This is not a bug, really. It has to do with the fact that a SubPanel is really a control with no value. In order to use it, you need to use it's methods. Since a SubPanel has no data (a null Variant, actually, if I recall), NI has hidden the block diagram terminal (does it even own a Terminal in the GObject model?). When you drop a SubPanel from the palette, I presume that NI executes a little snippet of code (defined in the palette's MNU file) that causes the invoke node to appear. There is no such provision for executing a snippet during copy+paste operations. I know that this is not a great reason that LabVIEW doesn't work the way that you'd expect, but that's how (I believe) everything works.

Jim is right to say it isn't a bug in the strictest sense -- in general, when we copy a control we don't copy all the property/invoke nodes for that control. But in the case of the SubPanel, you bring up a good point... since we don't have an FPTerminal, and sense the property node is how the Subpanel gets set, we should probably include code for creating the property node as part of pasting or otherwise duplicating the subpanel.

I suggest you file it as a bug report to NI.

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.