0

I have a requirement where I have to edit the settings of the GUI. Suppose if I will open a notepad now I need to change the setting by LabVIEW. e.g. changing the font. How can I do it? Please help me. enter image description here

kosist
  • 2,868
  • 2
  • 17
  • 30
Rasmi Ranjan Nayak
  • 11,510
  • 29
  • 82
  • 122
  • What exactly do you want to change? is this what you want? http://digital.ni.com/public.nsf/websearch/65F76F247012DF68862562C70073BE06?OpenDocument – CharlesB Nov 04 '13 at 08:40
  • You will need to look for an API for Notepad, however since Notepad is a flat text editor, I doubt you can change the markup of the text. You could look into autohotkey to control Notepad from a secondary app (like LabVIEW). – Ton Plomp Nov 08 '13 at 04:06

1 Answers1

0

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/creating_configuration_files/

One way to do it would be with a config file, property nodes associated with the front panel items you want to edit, and a button to activate a new event case. This is assuming your GUI or main VI already has a working event structure (I don't know any other way to have a GUI w/o an event structure).

In the event case, you would have it read the config file, return the keys, and based on the key value, change the value of a property node. If you know your property node takes some number value or a string, then you could directly wire the key value to the property node. Alternatively, you can send your keys as the input to a case structure. Then in your case structure, hardcode the options you want to send to your property node.

For example, to change the font (see http://digital.ni.com/public.nsf/allkb/6BD344ACA4DEE20A8625692700737E16), you can directly wire the output of the Read Key.vi to the Text.FontName input of the property node.

Then you can use notepad to edit your GUI settings "on the fly".

Kardo Paska
  • 504
  • 7
  • 17