Jump to content

Relink to library


Recommended Posts

Hello,

I am trying to generate properties for XControls. I know how to add them to the XControl.

But when I open the Xcontrol the XControl is broken and says the property is missing. And if I open the new property VI, it needs to be updated to get linked to the XControl.

To prevent this I save the property and close, add it to the XControl, save the XControl, open the property and save the property. This has not solved my issue.

Does anyone know how to do this (Jeffrey?)

Ton

PS it is currently the only thing between inheritance for XControls

Link to comment
To prevent this I save the property and close, add it to the XControl, save the XControl, open the property and save the property. This has not solved my issue.

Does anyone know how to do this (Jeffrey?)

A bit of glancing at XControls suggests to me that you may have a problem doing this...

The properties of an XControl are VIs, true, but they are specific kinds of VIs. Adding a VI to the XControl library and adding it as a property are two different things. In fact, I don't think there's any way to add a VI as a property. You can only create new property VIs. A property VI is a special type of VI and I'm not aware of any way to change one type into another.

I think what you'll have to do is create a new property and then copy the block diagram contents from the original VI into the new VI, and then hook up the controls on the front panel.

XControls aren't my area of expertise -- I only play with them because I think they're neat -- so I may be wrong. But that's what it looks like to me.

Link to comment

Hi Aristos,

I allready solved that, with this code:

post-2399-1167801276.png?width=400

So the XControl knows it is a property inside the right property folder. The problem is the VI, it doesn't know it is part of the XControl.

In a way XControls behave like lvlib's (here kicks in your knowledge about classes)

The library is looking for:

thisXcontrol.xctl:myProperty_read.vi

This is not found on the disk only myProperty_read.vi, and I have to browse to the file. When I open the item from the XControl I get the following:

post-2399-1167803397.png?width=400

Does anyone have a clue to resolve this?

Not that this are normal properties and methods not supersecret......

Ton

Link to comment
You're right, but I wonder is there anyone who has generated lvlib's? NI is doing it so there should be a property/method to claim a VI.

Ton

:lightbulb: Have you tried this?...

1) Load the VI into memory (open a VI Server reference to the VI)

2) Add the VI to the library/xcontrol while the VI is in memory

3) Save the VI

4) Close the VI Server reference to the VI

I believe that the VI will "sense" that it has been made a member of the library if it is in memory when the operation is performed and that this "sensation" will be persistent if the VI is saved.

I hope it works...

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.