Jump to content

Locating a specific active object


Recommended Posts

Let's say you have an an application which starts a few active objects. Is there a way to locate a specific instance of the active object? That is, all are descendants of the same class which has a Run.vi. I found a way to get a list of all VIs in the memory, but what I'd like to do is something in the line of:

- for all "Run.vi":

+ get the parent object

+ call "Read ID.vi" for that object

+ do stuff when you find the one you need...

Any help/pointers would be greatly appreciated.

Br, Mike

Link to comment

Maybe, when you initialize your active objects you could keep a registry (functional global / whatever) of the ones you launch? Then, you could use this whenever you want to do your action.

Already have that, but I still have to match the "Run.vi" in the memory with the appropriate object. This is the problem I'm trying to solve.

Br, Mike

Link to comment

Already have that, but I still have to match the "Run.vi" in the memory with the appropriate object. This is the problem I'm trying to solve.

Br, Mike

Do your 'Run.vi's have a control on the front panel that *is* the parent object - like SciWare's Process.vi has an the object control in his ActiveObject framework?

If so, can't you go get the value of that control and cast it to your desired object. This should be the instance of the object that launched the Run.vi, or am I missing something here.

Alternately, each of your ActiveObject could keep a list of the Run.vi's it launched and then you could exhaustively search for the reference that matches in all of the ActiveObjects your app created. But I like my other idea better.

Hope this helps.

Link to comment

Alternately, each of your ActiveObject could keep a list of the Run.vi's it launched and then you could exhaustively search for the reference that matches in all of the ActiveObjects your app created. But I like my other idea better.

Yes, thank you. This is exactly what I will use.

Br, Mike

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.