07-05-2009 09:29 AM
Workaround: Try putting a Begin Transaction call before the call to the method and an End Transaction call after the call to the method.
I call it a workaround, but it may not be a bug. Here's the fundamental problem that scripting faces: Should every method/property call return the VI to a runable state? Should every method/property re-evaluate the brokenness of the VI? If you're going to be calling a whole lot of scripting operations in a row, the answer is "no" because you don't want to waste the time redoing good/bad state tests, redoing type prop and redoing compile between every meth/prop call. But if you're only doing a couple of functions, that overhead is less significant and you may not want the bother of a Begin Transaction/End Transaction pair. And, since the transaction wrapper means that your edits are now undoable on the VI, that may also be undesirable.
Most scripting functions were created by a developer who needed them for a reason. It is only in recent years that we started saying, "Everything you can do from the editor should have a method/property to let you do it programmatically." As a result, a lot of functions were added by developers for a particular edit, and some of those edits couldn't waste time with the various "update the VI" procedures. So, to make them faster, they don't do it. Adding them now might make for a more consistent scripting API, but it might slow down those VIs beyond unusable, and LV has no way of knowing who is using that API, so we'd have to build a new meth/property to incorporate the "update the VI" functionality.
You can see why we resisted releasing scripting all those years. The amount to be cleaned up is huge.
07-06-2009 07:28 AM
Another possible workaround is to run the VI method Cause Type Propagation.
07-07-2009 04:29 AM
Ok, this will update the executableness, but how about stteing the docmod?
There is a method called "Front Panel. Set Mod", but the documentation doesn't tell what values to pass as parameter and I'm not even sure this is what I need.. Any idea how I can set the docmod or do something that will force LabVIEW to update this display?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
07-07-2009 09:59 AM
1) Make sure that your Open VI Reference function is passing along the flag that says to record doc mods.
2) Assuming that is happening, if you use the Begin Transaction and End Transaction wrappers, I am fairly certain you'll get the docmod you're looking for.
07-07-2009 10:30 AM
I'm confused, I'm not sure I understand what you mean by "Make sure that your Open VI Reference function is passing along the flag that says to record doc mods."
If this is what you mean, then for me it doesn't work
Am I missing something?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
07-07-2009 10:33 AM
TiTou wrote:
I'm confused, I'm not sure I understand what you mean by "Make sure that your Open VI Reference function is passing along the flag that says to record doc mods."
If this is what you mean, then for me it doesn't work
Am I missing something?
He's referring to wiring a '1' to the options input of Open VI Reference so that modifications are recorded.
-D
07-07-2009 10:33 AM
There is an input to the Open VI Reference primitive called "options". The online help describes all the flags. One of the options is "record doc mods". Make sure you're setting that flag when you open the VI reference, otherwise whenever you make edits to the VI, my understanding is that LV will supress the docmod.
07-07-2009 10:44 AM
Oh.. I see, I didn't know about this option... Thanks, it works great
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
07-08-2009 10:45 AM
Antonio, is your xml-rpc 'library' for labview avaialble anywhere for download?
07-09-2009 03:35 AM
You can now put your scripting skills to use by creating your own plugin for the JKI Right-Click Framework.
Yes, we've finally released it to the public -- thanks for everyone's patience.