In non-sequential ZEMAX, the background material is always assumed to be air. However, since the nesting of materials is supported, it is extremely easy to define a background material out of a volume object which encloses the entire optical assembly.
For example, imagine that you wanted to immerse your entire design in water. Using the “Even Asphere.ZMX” sample file (located in the ZEMAX > Samples > Non-Sequential > Miscellaneous directory) for demonstration, a Sphere object (or any desired volumetric object, for that matter) could be inserted as Object 1:
By setting the Material to WATER, the Radius to 100, and the Is Volume? flag to 1, a volumetric sphere of water is created which encloses all other optical components:

As the scale of the plot becomes skewed due to the size of the sphere, the sphere may be ignored for drawing purposes:

To finalize the procedure for imbedding a design in a desired background material, it is important to flag sources as being inside of the volume if they truly exist inside it in 3D space. In the present example, both Source Ellipses exist within the sphere of water, thus the Inside Of flag should be set to 1 for both source objects:
As a result, the refraction of the ray at the front and back face of the lens changes drastically, as the interfaces now describe a separation between water and BK7 instead of air and BK7.
In a mixed mode file, the background material for an entire NSC group may be defined by the Glass column for the NSC surface in the LDE:
Note, however, that because the entry and exit ports serves as an interface between the sequential surfaces and the NSC group, these ports can have refractive power if a non-air glass is applied to the Non-Sequential Component surface in the LDE.
If this is not a desired solution, yet a “background” material is still desired, then the same solution which is described for a pure NSC system can be utilized in the NSCE of a mixed mode design.
This article has outlined the procedure for creating a background material other than air for a NSC group. In a pure NSC system, this is accomplished by enclosing the desired elements in a larger volume of a non-air material. Considering the nesting rule, the enclosing volume should be listed prior to the elements which will be imbedded in it.
For mixed mode systems, the background material for an NSC group is defined by the Glass definition in the LDE for the specified Non-Sequential Component Surface.
REFERENCES
ZEMAX Optical Design Program User’s Guide, ZEMAX Development Corporation