I can't find a way to set the x axis name (wf_xname) for an analog waveform channel. The only way I found is not valid for the WaveformTiming with the RegularInterval option.
var opt = new TdmsAnalogWaveformWriteOptions {TimingAxisName = "time"};
It seems that the analog wfm properties are autogenerated at save by the tdms Library and then they are read-only. automaticproperties
code example:
var myTdmsWfmGrp = myTdmsFile.AddChannelGroup("ScopeShotsWfm"); myTdmsWfmGrp.WaveformLayout = tdmsWaveformLayout.NoTimeChannel; var wfmData = AnalogWaveform<double>.FromArray1D(yData); wfmData.PrecisionTiming = PrecisionWaveformTiming.CreateWithRegularInterval(PrecisionTimeSpan.FromMilliseconds(xData[1] - xData[0]),PrecisionDateTime.Now); var myTdmsWfmCh = new TdmsChannel(scopeChannel, TdmsDataType.Double, "Voltage", "V"); myTdmsWfmGrp.AddChannel(myTdmsWfmCh); myTdmsWfmGrp.AppendAnalogWaveform<double>(myTdmsWfmCh, wfmData); myTdmsFile.Save();