09-02-2008 04:30 AM
Hello,
My VI is using contextual shortcut menus when right clicking on graphs. I have done this by linking the graph with a .rtm file which includes my menu.
Everything worked fine until I wanted to publish my application. I have built an exe file, and from my tests it still use the original .rtm file for the menus (and therefor does not work on other computers than mine).
So how do I link this file within my .exe to have it work on other computers?
Thanks for your help,
Best regards,
Jean-Marc
09-02-2008 07:58 AM
Jean-Marc,
after editing the RTM of a control, LV 8.6 lets you choose weither the RTM should be saved with the control orif you want to save it seperatly.
I am not sure if earlier version gave you that option, but even if they do, you obviously chose NOT to include the RTM to the control. So you should have an *.rtm-file somewhere in your project.
You have to make sure that this file is included in/with the exe. If not, the runtime-menu of the exe will be the default one.....
hope this helps,
Norbert
09-02-2008 08:51 AM
Thanks Norbert for you answer.
Yes I do have an external .rtm file. I know my .exe is still using because when I rename it, it doesn't work anymore.
So I want to include this in my .exe release and I don't know how. I can't just copy the file because I believe it's looking for it with an absolute path and not a relative path.
09-02-2008 08:58 AM
Jean-Marc,
i am not 100% sure if this will work out for you like it did for me, but here is what i tested:
a) Add the *.rtm to the project.
b) In the build specification, add the *.rtm to the files "always included" (bottom box on the right in the Source Files tab).
c) Build the application
d). Move the exe around. This worked on my machine without the need for of the *.rtm-file itself
Conclusion: The file is packed into the exe....
So i hope this works for you as well....
Norbert
09-02-2008 10:04 AM
Ok,
This might look terribly stupid but once I have added my main vi, in the "Project/Add to Project" menu I only have "New VI" and "New... ". So I don't know how to do step a). :- /
The "Project/Add to Project/File..." is disappearing as soon as I have added on file to the project.
09-02-2008 10:21 AM
Jean-Marc,
open the lvproj, and in the projectexplorer, rightclick e.g. "My Computer". You should get a context menu with one possible selection named "Add". Expand this and select "File". Browse to the *.rtm and select it for adding.
a) is now finished 🙂
Norbert
09-02-2008 10:33 AM
Oops, very stupid indeed
...
It's weird this option does not appear in the "add to project" menu though...
Everything works fine now.
Thanks very much for your help Norbert.
Best regards,
Jean-Marc