# Extract automation points via javascript

**URL:** <https://qa.fmod.com/t/extract-automation-points-via-javascript/23073>\
**Category:** FMOD Studio\
**Created:** [June 23, 2025, 6:44pm UTC](https://qa.fmod.com/t/extract-automation-points-via-javascript/23073 "2025-06-23T18:44:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cttpla](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cttpla](https://qa.fmod.com/u/cttpla)\
**Post date:** [June 23, 2025, 6:44pm UTC](https://qa.fmod.com/t/extract-automation-points-via-javascript/23073/1 "2025-06-23T18:44:17Z")

</div>

Hello, this script is supposed to extract points from automation track but doesn’t work because it seems that the automationTrack doesn’t have any “points” property, so volumeTrack.points returns null.  
How can refer the points in the automationTrack in js with FMOD 2.03 ?  
Thanks!

studio.menu.addMenuItem({  
name: “Export Volume Curve to CSV”,  
isEnabled: function() { var eventt = studio.window.browserCurrent(); return eventt && eventt.isOfExactType(“Event”); },  
execute: function () {

```
    const event = studio.window.browserCurrent(); // Get the currently selected event
    if (!event) {
        studio.system.message("Please select an event to export its volume curve.");
        return;
    }
    var tracks = event.masterTrack.automationTracks;
	
    var volumeTrack = tracks[0];
	
	let points = volumeTrack.points;
	
	if (points == null) {
        studio.system.message("No automation points found in the volume track.");
        return;
    }
		
    if (points.length == 0) {
        studio.system.message("No automation points found in the volume track.");
        return;
    }

    // Prepare CSV content
    let csvContent = "Time (ms),Volume (dB)\n";
	for (x = 0; x < points.length; x++){
        csvContent += points[x].time + "," + points[x].value + "\n";
    };

    // Save CSV file
    const filePath = studio.system.getFile("C:/extract.csv");
    if (filePath) {
        studio.system.writeFile(filePath, csvContent);
        //studio.system.message("Volume curve exported successfully to: " + filePath);
    } else {
        studio.system.message("Export canceled.");
    }
}

```

});

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [June 30, 2025, 12:30am UTC](https://qa.fmod.com/t/extract-automation-points-via-javascript/23073/2 "2025-06-30T00:30:44Z")

</div>

Hi,

Thank you for sharing the information and code!

> [@cttpla](#):
>
> How can refer the points in the automationTrack in js with FMOD 2.03 ?

To access the points in automationTrack, you could reference them like this:

```auto
var event = studio.window.browserCurrent()
var point = event.groupTracks[0].modules[0].automators[0].automationCurves[0].automationPoints[0]

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/f/f7c4ffb725acbc94b740eddf0d213e44a168fab6.png)

Please note that this example assumes there is only one instrument on the first audio track with a single automator. You may need to adjust the indices based on your event’s structure.

Hope this helps! Let me know if you have questions.
