11-19-2013 05:20 AM
Dear community
I have a relaively simple question.
There are a lot of labview build in commands in the APP_SC_....... section for different actions.
I want to execute some of these commands by using a button event instead of the runtime menu event.
As all these commands are somewhere build in the developement enviornment I am wondering if they are somehow accesible by the usage of a kind of invoke node.
Hope you have a nice idea how I can use these command in an "invoke node" like style.
Thank you
Gernot
Solved! Go to Solution.
11-20-2013 06:00 AM
Dear Gernot,
i would like to help you with this. Could you please upload some screenshots so I can see what you have done so far?
Thank yo very much.
Best regards,
11-20-2013 06:23 AM
Dear cristopher
I have attached a very simple sample vi which should illustrate what I want to do.
I only want to fire the standard shortcut menu commands programatically by using a different event like value changed on a button.
You see in the green underlayd case what I am thinking about.
Thank you
Gernot
11-20-2013 08:33 AM
Hello Gernot,
Now I see. Yes you can do this.
I attached an edited version of your VI where I used two possible way to achieve the desired behaviour:
- restore standard value with invoke node (workaround, not exact solution)
- really adding context menu item:
Add a new event case, react to opening the context menu and then programatically add the desired command.
Please also refer to LV Help, there you can read how to do this. See screenshot, where you can find all these options explained.
Do you have german or english LV?
Best regards,
11-21-2013 02:15 AM - last edited on 05-21-2024 10:01 AM by Content Cleaner
Dear Christoper
Thank you for your help.
I am sorry but it is still not the behaviour I wanted to effect.
The main idea is not to manipulate the shortcut menu programatically (I already do this sucessfully and it is written in the help)
I want to execute the labview build in commands which are underlying to the context menus.
As you can see here
there are many items available e.g. APP_SC_DELETE_ROW which are very nice to use by the context menu but not transferable to a button click.
The only way I can do this is writing (wireing) some code to delete row.
A similar example would be on a graph where the command APP_SC_AUTOSCALE_X is available.
If I don't want to show the scale legend and want to have two possibilities to autoscale x .
One should be to use the shortcut menu entry which is no problem, the other would be to use a button who should either propagate the command to the shortcut menu item APP_SC_AUTOSCALE_X or send the command
APP_SC_AUTOSCALE_X directly somewhere ito the system so it will be executed.
I know there would be also the solution to set the property node for x-autoscale to true and then again to false , where I think it would be much more comfortable to use these nice build in functions (but how).
My expection would have been that all these commands were also available via invoke node.
Sorry for my long information but it is due to make it more clear what i want to do with the Standard Item Tags of runtime shortcut menu's
Gernot
11-21-2013 03:31 AM - edited 11-21-2013 03:32 AM
Hello Gernot,
first of all: the more information, the better!
So I got your idea wrong after all. Hmm, I don't think it is possible this way.
These commands really are meant to be used in the context menu.
But, if there are property nodes for the things you want to do, why would it be more comfortable for you to use these commands?
Best regards,
11-21-2013 03:43 AM
Hi Christoper
Thank you, it is good that you got my problem (which is not too big but it would be comfortable to use these build in commands)
To clarify the property node difference is the following.
If I would use e.g the command APP_SC_AUTOSCALE_X then the event will force a single action to aute scale the x-axis of a graph.
If I use the propety node i can only set it to true and then it is set "forever" so i have to set it back manually which is not so comfortabel as to send APP_SC_AUTOSCALE_X.
On the other hand some of these nice commands are not settable via property node or invoke node so it needs to be programmed "manually".
An other very interesting command would be APP_SC_DELETE_COLUMN or the APP_SC_INSERT_COLUMN_BEFORE
Nevertheless I think there is not such an easy solution which I wanted to see on the horizon.
If you see it in a similar way please let my know so I can accept this "limitation" and go on with my known methodes (do it on my own)
Thank you
Gernot
11-21-2013 04:40 AM
Hello Gernot,
considering the manipulation of arrays: why not use the functions from the array palette, fired by boolean buttons?
OK, there you have to set up some things, but it could be a possible way.
But all in all, I think I have to say that these context menu commands cannot be used in block diagram (to give a concret answer).
Best regards,