Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
English (US)
US English (US)
DE German
CN Chinese
MX Spanish (Mexico)
Chinese (Simplified)
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Programming (AMX)
  • Programming

AMX Multi Dimensional Arrays or Data Structures

Written by Gary Brindley

Updated at December 29th, 2025

Table of Contents

Overview: Adding Dimensions to Arrays: Building a Structure: Summery:

Overview:

In Axcess programming, you can create a 2-dimensional array to store and access data.  For example, you could create an array to store 20 records of 30 names, then another 2- dimensional array to store a matching list of speed-dial numbers.  NetLinx gives you the power to expand that list up to 5 dimensions, eg; arrayed by name, department, city and country.

Adding Dimensions to Arrays:

Adding a dimension does not add data — it multiplies memory.  The first 2 dimensions create a "sheet" of data, a list of 20 records of 30 names, and reserves 600 bytes in memory.  Adding the department dimension with 15 departments creates 15 folders, each set to store up to 20 sheets - 9,000 bytes of memory.  Adding another dimension for say, 20 cities creates 20 "file drawers" that hold an equal number of 9,000 byte file folders.  Now the array multiplies up to 180,000 bytes.  Adding the final array of 10 countries creates 10 "file cabinets" - reserving up to 1.8 MB of memory! And that's just the names — you'll need another 1 MB for phone numbers.  Arrays reserve an equal amount of memory for each dimension regardless of actual data requirements so much of the memory is wasted on reserving space for unused data.  The result is a sparse array with much wasted space and a significant increase in NetLinx code complexity to manage the data.

Building a Structure:

In the Define_Type section of NetLinx Studio, you can create a “Structure" called, say "PhoneList".  Using Structure, you're building a database with Name, Number, Department, City and Country fields.  After defining the reserved characters for each field, each record can hold up to 102 bytes.  So if the company has 500 employees, the entire speed-dial database requires only 50,100 bytes, regardless of the number of countries, cities, and departments.

Summery:

In general, while you may be more familiar with arrays from Axcess, you should use Structures if you go beyond 2-dimensional arrays.  Arrays work well if each level stores an equal amount of data — which usually isn't the case beyond 2 dimensions.  In fact, you might consider using Structures instead of arrays any time your data has multiple fields.  This makes your code easier to maintain and more reusable.

Related Videos

datastructures arrays

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Overview: Adding Dimensions to Arrays: Building a Structure: Summery:

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand