Jump to content

XControl Causes VI to become Unsaved


Recommended Posts

Hi guys,

I've got this issue thats becoming quite annoying. I've got an xcontrol that has a property called 'Get Reference'. This returns the reference of the control within the xcontrol...so i can use some of it's inherited properties (without having to recreate them myself)

It works great. The problem is, it always makes the calling VI unsaved no matter how many times i save it. I've pinpointed it down to the exact event in the facade.vi that's causing it. (see facade.jpg) -attached

If i do not set StateChanged? to TRUE in the Exec Change event, the reference will return 0 and i will get errors when using it in the Calling VI. But if i do set it to true, it causes the VI to become unsaved.

Any ideas as to how i can get around this?

I can also post code if necessary.

post-12653-126417771791_thumb.jpg

Link to comment

There is no need to store the ref each time you switch the run-mode. Just write the ref ones to the state data, there are several ways to achieve this, here's one example:

post-906-1264194874_thumb.png

As a matter of fact you could do this in either of the four "... Change" states since they all get called when the XControl is instantiated.

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.