LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenG Toolkit Fit VI to Decoration gives "Is Read Only when seen through Sub Panel" - won't work

Solved!
Go to solution

So I figured out how to get the OpenG Fit VI Window to Decoration Function working for a singular VI. Meaning, for the VI that it is implemented in, when I run the program, the Front Panel does resize to the dimensions of the decoration I've told it to wrap around. But that VI I want seen inside a main VI through the use of a sub panel.

 

But when I do this, when I run the main VI, the Fit VI function returns the error - Read Only when VI seen through Sub Panel. And the VI doesn't show up at all in the main VI. Is there a way around this?

 

Or is there a way to have the Sub Panel window center on a specific portion of the VI it is imaging?

0 Kudos
Message 1 of 2
(2,072 Views)
Solution
Accepted by topic author ShogunOrta

When a VI is in a sub-panel it's "size" is determined by the size of the sub-panel, and it's view area is determined by the "origin" property of its Pane object.

 

So, get a reference to the Sub Panel object and use that to set the Bounds properties, and get a reference to the embedded VI (or do it from within the embedded VI's code) and get the reference to the Pane.  Note that the pane can either be linked to directly inside of the embedded VI by putting down a property node and right-clicking to select "Link to → Pane → Pane", or from the reference to the VI using the "Front Panel" property to get that reference, then getting the "Panes[]" reference from that, then getting the pane at index zero of that array.

0 Kudos
Message 2 of 2
(2,064 Views)