Home AMX User Forum AMXForums Archive Threads Residential Forum

Updating many Variable Text Fields.


As i dive deeper into programming im begining to understand how to make some of my programs run a little more efficient. However, i am having a hard time finding an approach to updating several VT fields at the same time, heck even on multiple panels. Lets use a media server as an example; one would have to update tons of metadata to several VT fields (scrolling list??)--and lets not forget volume, and audio zone data, and,and,and---to multiple panels!!! Oy vey. Any good example out there someone can share?
Thanks in advance.


  • - try saving the data in a struct!
    for your example try
    - write a function that is sending the struct-entries from nActualPosition to nActualPosition+nNumberOfLines. e.g. from 3 to 23 when 3 is your position and you have 20 lines.
    - maybe the actual position is an array of integer when you have more than one Touchpanel
    - think about parsing a .csv file for the input of the data. edit your data in Excel, export as csv, ftp it to the netlinx master and parse it in the DEFINE_START section

    i'd make another array for volume state/mute state/ and so on
  • jisaacjisaac Posts: 34
    Thanks for the quick response. Im not very familiar with .csv files, could i copy and paste some large album/artist/song title list from say Amazon into Excel, then save as .csv, ftp to master etc.? or am i misunderstanding you?
    sounds like the making of an excellent training idea though!
  • DHawthorneDHawthorne Posts: 4,584
    Don't let the fact that Excel handles them confuse you; a csv file is nothing more than a comma-delimited data list. Each record takes a line, and each field in the record is separated by commas.

    Some general rules about updating text fields:

    Don't send a lot of stuff at once. Broadcasting a list, for example to an entire array of panels can really bog things down. If you really must send a lot of data to a lot of panels, break it up with a timeline so the devices can catch up. A few tenths of a second delay is practically undetectable by your user, but will give your devices much needed time to process.

    Don't send to a panel that is off line or not currently displaying the data. Use an array of flags to determine whether a panel needs the update before sending it.

    Only send data that has actually changed. Track the last version of a string, and compare it to the current before updating it.

    Don't put your variable text feedback in mainline.
  • GSLogicGSLogic Posts: 562
    DHawthorne wrote:
    Some general rules about updating text fields.
    Words of wisdom, well said!
Sign In or Register to comment.