Batch Convert 1,000+ IES Files to LDT with IntensityView + ChatGPT

Batch Convert 1,000+ IES Files to LDT with IntensityView + ChatGPT

Automate IES-to-LDT conversion with IntensityView, ChatGPT and Excel VBA. Rotate photometry, extend gamma coverage and process entire folders.

2026-10-17 54 reads

Batch Edit Photometric Files: Convert IES to LDT with IntensityView and Excel

A lighting tender may require more than a different file extension. Every photometric file might also need a consistent orientation, a specific angular grid, and complete coverage of the upper hemisphere. Applying those changes manually is straightforward for a few files. Repeating them across a folder of more than a thousand files calls for automation.

In this tutorial, we use EIKONAL.WORKS IntensityView, its API documentation, and an Excel VBA macro generated with ChatGPT to turn a repetitive editing task into a repeatable batch workflow.

Explore IntensityView at EIKONAL.WORKS

The task: prepare an entire photometric library for a tender

Our starting point is a folder of IES luminous intensity distribution files. The requested deliverables are EULUMDAT files, commonly identified by the .ldt extension, with the same filenames and a consistent set of edits.

Requirement Operation
Deliver EULUMDAT instead of IES Export each distribution as an LDT file
Adjust the photometric orientation Apply a positive 90° rotation
Include the upper hemisphere Extend gamma-angle coverage through 180°
Use the required angular spacing Set the gamma resolution to 10° steps
Keep the results easy to identify Preserve each filename stem in a separate output folder

The luminaires in this example have zero upward light output. Their newly added upper-hemisphere samples therefore contain zero intensity. The extra angular coverage satisfies the requested data layout; it does not introduce light where none is emitted.

This assumption belongs to this dataset. For luminaires with upward emission, preserve the actual upper-hemisphere data. Missing angular samples alone are not evidence that the intensity is zero.

1. Establish the editing sequence on a sample file

Before automating the folder, perform the required operations on a representative file in IntensityView:

  1. Import the IES file.
  2. Open Edit, select Rotate, enter +90°, and apply Update.
  3. Open Resolution, set the gamma-angle range through 180° with 10° steps, and apply Update.
  4. Use Save As to export the result in EULUMDAT/LDT format.

This sample establishes the intended result and gives you something to compare with the automated output.

A photometric rotation changes how the distribution is oriented relative to its reference axes. Confirm the direction of the rotation with an asymmetric distribution: a symmetric beam may look unchanged even when rotated correctly.

Applying a positive 90-degree rotation to an asymmetric luminous intensity distribution Gamma-angle settings extending the photometric distribution to 180 degrees in 10-degree steps

In the editing workflow demonstrated in the video, up to 12 photometries can be edited together. That is useful for small groups, but a folder of over a thousand files would still require many repetitions. The API allows us to express the sequence once and apply it file by file.

2. Prepare the input folder and Excel workbook

Keep the original IES files in an input folder and create a separate folder for the converted LDT files. For the first run, use a small test folder containing a few representative files.

Create an Excel workbook with a worksheet named MAIN:

Cell Contents Example
B2 Full path to the input folder C:\\Photometry\\IES_Input
B3 Full path to the output folder C:\\Photometry\\LDT_Output

Add descriptive labels in cells A2 and A3. Save the workbook in a macro-enabled format, such as .xlsm.

You will need IntensityView, access to its documented automation interface, and desktop Excel with VBA support. Follow the API documentation for any installation, licensing, or automation setup requirements.

Excel MAIN worksheet containing input and output folder paths in cells B2 and B3

3. Give ChatGPT the IntensityView API documentation

Download the API agent Markdown file from the IntensityView documentation and attach it to your ChatGPT conversation.

The documentation supplies the application-specific interface: how to open a file, edit its distribution, export it, and release resources. ChatGPT can use that information to translate the workflow into VBA.

ChatGPT generates the macro; IntensityView performs the photometric operations. The generated code should call the documented API rather than attempt to reconstruct IES and EULUMDAT parsing or photometric transformations independently.

Attaching the IntensityView API agent Markdown documentation to ChatGPT

4. Generate the batch-processing macro

The prompt below expands the workflow shown in the video with basic validation, logging, and protection of the original files. Paste it into ChatGPT alongside the API documentation.

Create an Excel VBA macro that automates EIKONAL.WORKS IntensityView
using the attached API agent Markdown documentation.

Use only documented interfaces, methods, parameters, and enum values.
Do not invent API calls. If any required operation is unsupported or
ambiguous, explain the issue before generating code.

Configuration:
- Worksheet: MAIN
- Cell B2: input folder containing IES files
- Cell B3: output folder for LDT files

Process every .ies file directly inside the input folder, one at a time:
1. Open the photometry through the documented IntensityView API.
2. Apply +90° rotation using the operation corresponding to Rotate
   in the editor. Explain the axis and positive rotation convention.
3. Apply the documented Resolution operation to produce gamma angles
   from 0° through 180° in 10° steps.

   These luminaires are confirmed to have zero upward light output.
   Newly added upper-hemisphere samples should have zero intensity.
   If an input contains nonzero upper-hemisphere values, flag that
   file for review instead of silently replacing those values.

   Use the documented resampling behaviour for existing angular
   data. Explain any interpolation involved. Preserve other
   photometric properties and metadata where supported.

4. Export as EULUMDAT (.ldt) to the output folder, preserving the
   original filename stem.
5. Release the current photometry before opening the next file.

Validate the folder settings and require separate input/output folders.
Do not modify the source files.
Skip and log existing output files rather than overwriting them.
Log each file's result, warnings, and errors to a LOG worksheet.
On a per-file failure, clean up and continue when possible.
Provide a final count of successful, skipped, failed, and
review-required files.

Return complete VBA code with one clearly named public macro
that can be assigned to an Excel button.
Include setup instructions and any required VBA references.
Explain how to test the macro on a small sample.

Resampling onto a new angular grid can change numerical values through interpolation. It is a separate operation from extending angular coverage. Review the generated explanation and confirm that it matches the settings you applied manually.

5. Add the macro to Excel and test it

Open Excel's VBA editor, insert a standard module, and paste the generated code into it. Complete any reference or setup steps specified by the documentation and the generated instructions.

Add a button to the MAIN worksheet and assign the public batch-processing macro to it. Your workbook now provides a simple interface: set the input folder, set the output folder, and run the operation.

First, point B2 at your small test folder. Run the macro and inspect its log before moving to the full dataset. If the generated code fails, provide ChatGPT with the exact error and relevant code, keeping the API documentation attached.

6. Verify the photometry, then process the full folder

A successful export confirms that a file was written. Reopening the exported LDT files confirms whether the intended edits were applied.

Check What to inspect
File format The output opens as EULUMDAT/LDT, rather than an IES file with a renamed extension
Rotation The distribution has the expected +90° orientation relative to its reference planes
Angular coverage Gamma samples extend through 180° at the requested 10° spacing
Upper hemisphere Added values are zero for this confirmed zero-uplight dataset
Distribution integrity The beam retains its intended shape after rotation and resampling
Flux and normalization No unintended scaling or normalization change has occurred; investigate unexpected differences
Metadata Relevant luminaire identification, dimensions, and other supported fields remain correct
Batch completeness Every source file is accounted for as successful, skipped, failed, or requiring review

Compare the automated output with the manually edited sample. Include an asymmetric distribution in your checks, and review any warnings about unexpected upward intensity.

Once the sample results are correct, change B2 to the full source folder and run the same macro. Review the completed log and reconcile the output with the source-file count.

Converted LDT files and the batch-processing log showing completed exports

Turn a one-off conversion into a repeatable workflow

The workbook keeps the folder locations separate from the processing logic. Once the macro is tested, it can be reused for another delivery with the same requirements by changing the paths in MAIN.

For a different task, update the requested operations against the API documentation and validate a fresh sample. Keep the workbook, the documentation version used to create it, and the processing log together so the transformation can be reproduced later.

This approach combines IntensityView's photometric editing capabilities with a familiar Excel interface. It reduces repeated manual steps while making the sequence of changes explicit and reviewable.

Have a photometric library to prepare? Explore IntensityView, and watch LightingTechTips with Lizzy to see this workflow in action.