Dan Bookwalter Posted May 15, 2008 Report Share Posted May 15, 2008 can a DD vi be inserted into a sub panel ??? thanks Dan Well , never mind I answered my own question ..... as usual i figure it out AFTER i send off a request .... Dan Quote Link to comment
TobyD Posted May 15, 2008 Report Share Posted May 15, 2008 QUOTE (Dan Bookwalter @ May 14 2008, 01:12 PM) Well , never mind I answered my own question ..... as usual i figure it out AFTER i send off a request .... When you answer your own question it is always nice if you post the answer so those who come along with the same question can see what you figured out. Quote Link to comment
gb119 Posted May 15, 2008 Report Share Posted May 15, 2008 QUOTE (Dan Bookwalter @ May 14 2008, 09:12 PM) can a DD vi be inserted into a sub panel ???thanks Dan Well , never mind I answered my own question ..... as usual i figure it out AFTER i send off a request .... Dan But forgot to tell us the answer Which is yes you can, but it takes a little bit of work to get the right vi reference to insert... The attached project (8.5.1) is a quick hack I did to test what the answer was - the picture below shows the guts of the calling program. The mystery vi that takes a LabVIEW object and returns the class path that lets you build the string to properly qualified vi-name can be found in <vi.lib>\Utility\LVClass\ Download File:post-3951-1210796693.zip Oh yes, and I should have closed that vi-reference.... Quote Link to comment
Dan Bookwalter Posted May 15, 2008 Author Report Share Posted May 15, 2008 QUOTE (Gavin Burnell @ May 14 2008, 04:26 PM) But forgot to tell us the answer Which is yes you can, but it takes a little bit of work to get the right vi reference to insert... The attached project (8.5.1) is a quick hack I did to test what the answer was - the picture below shows the guts of the calling program. The mystery vi that takes a LabVIEW object and returns the class path that lets you build the string to properly qualified vi-name can be found in <vi.lib>\Utility\LVClass\ Download File:post-3951-1210796693.zip Oh yes, and I should have closed that vi-reference.... Well what i did was within the DD vi i wanted displayed in the sub panel is this... Quote Link to comment
Aristos Queue Posted May 16, 2008 Report Share Posted May 16, 2008 QUOTE (Dan Bookwalter @ May 14 2008, 03:12 PM) can a DD vi be inserted into a sub panel ??? As I've mentioned before: A VI that does dynamic dispatching is just a plain VI with a mark on its conpane. The Control VI or the Global VI -- these are special types of VIs. But there is not a "dynamic dispatch VI" type. To the best of my knowledge, there are only two places that dynamic dispatch VIs cannot be used that you can use a static dispatch VI: as one of the VIs inside a polymorphic VI and as the VI called by a Call By Reference node. Quote Link to comment
Tomi Maila Posted May 16, 2008 Report Share Posted May 16, 2008 The only way to get the right clone instance of right dynamic dispatch VI to a subpanel is to ask the VI reference or the clone name from the dynamic dispatch VI itself. First assume you have a class hierarchy with multiple dynamic dispatch VIs of the same name in the hierarchy. Any one of those VIs can be called when the dynamic dispatch VI subVI node is executed so you cannot use static linking to some specific VI. Also, if the dynamic dispatch VI is reentrant, then also any clone instance of any of those dynamic dispatch VIs in the hierarchy can be called when the dynamic dispatch VI subVI node is executed. As a result, you cannot use open VI reference based linking to any specific VI unless you also know the VI clone name. The only way you can get either the VI reference or the clone name is to ask the dynamic dispatch VI being executed to return it to you somehow while it executes. You can for example use a single element queue to pass the VI reference asynchronously from the dynamic dispatch VI to the calling VI. At least that's what I would do. Quote Link to comment
gb119 Posted May 16, 2008 Report Share Posted May 16, 2008 QUOTE (Tomi Maila @ May 15 2008, 07:29 AM) The only way to get the right clone instance of right dynamic dispatch VI to a subpanel is to ask the VI reference or the clone name from the dynamic dispatch VI itself. First assume you have a class hierarchy with multiple dynamic dispatch VIs of the same name in the hierarchy. Any one of those VIs can be called when the dynamic dispatch VI subVI node is executed so you cannot use static linking to some specific VI. Also, if the dynamic dispatch VI is reentrant, then also any clone instance of any of those dynamic dispatch VIs in the hierarchy can be called when the dynamic dispatch VI subVI node is executed. As a result, you cannot use open VI reference based linking to any specific VI unless you also know the VI clone name. The only way you can get either the VI reference or the clone name is to ask the dynamic dispatch VI being executed to return it to you somehow while it executes. You can for example use a single element queue to pass the VI reference asynchronously from the dynamic dispatch VI to the calling VI. At least that's what I would do. Yes - I hadn't thought through the problem of reentrant dispatch members. My code did handle constructing a reference to the right version of the dynamic dispatch method, BUT, only if the method was implemented in all the classes. One could probably write code that traverses the class hierarchy looking for the correct dynamic dispatch method yo open a reference to, but it still falls over on reentrant vis. So, there doesn't seem to be a good way that avoids code in the embedded methods to handle doing the embedding. I think I'd probably would (and in fact will do) pass the reference to the subpanel control into the method and handle the embed and unembed within the dynamic dispatch method. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.