Export mulitple_frames with custom property arrays

I was trying to export the trajectory with additional properties, while doing I have to do it frame by frame, is it possible to do it in single trajectory (multi-frame) file?

following is the code

#voxel and lbl is a  [n,3] array (n is number of atoms in each frame)

for iframe in range(traj.source.num_frames):
    dc = traj.compute(iframe)
    dc.particles_.create_property('d', data=np.array(voxel)[iframe], dtype=float, components=3)
    dc.particles_.create_property('s', data=np.array(lbl)[iframe], dtype=float, components=3)
    export_file(dc, f"ap/trajec_xyz/traj_{iframe}.xyz", "xyz", columns =["Particle Identifier", "Particle Type", "Position.X", "Position.Y", "Position.Z", "d.0", "d.1", "d.2", "s.0", "s.1","s.2"])

I also tried with

export_file(dc, f"ap/trajec_xyz/traj_{iframe}.xyz", "xyz", columns =["Particle Identifier", "Particle Type", "Position.X", "Position.Y", "Position.Z", "d.0", "d.1", "d.2", "s.0", "s.1","s.2"], mutiple_frame=True)

but output is not as expected

It would be best to create the particle properties within the scope of a Python script modifier function, which you then append to the pipeline. That way you can invoke the export_file function like this:

export_file(traj, "ap/trajec_xyz/traj_*.xyz", "xyz", columns =["Particle Identifier", "Particle Type", "Position.X", "Position.Y", "Position.Z", "d.0", "d.1", "d.2", "s.0", "s.1","s.2"], multiple_frames = True)

to evaluate the complete trajectory and export the results. Have a look at this more detailed introduction to the topic here: User-defined modifiers — OVITO Python Reference 3.9.2 documentation.