How to distribute without the occurart tool?
Create four objects. Enter the names of the objects at each end, A and D. Type B and C in the middle. Then spread the distance on the y-axis.
import bpy

#Compare y-axis distances

dif = bpy.data.objects[&quot;A&quot;].location.y - bpy.data.objects[&quot;D&quot;].location.y

#There are four objects, so do 4-1.

chunkglobal = dif / (4-1)

chunky = 0

#Sets the initial location value.

deltafst = bpy.data.objects[&quot;D&quot;].location

 
OBJECT = bpy.data.objects[&quot;A&quot;]

#In object, enter the location information for A.
    
OBJECT.location.y = deltafst.y + chunky

#Add the total length divided by the average length.

chunky += chunkglobal

#Repeat to the following object

OBJECT = bpy.data.objects[&quot;B&quot;]
    
OBJECT.location.y = deltafst.y + chunky

chunky += chunkglobal

OBJECT = bpy.data.objects[&quot;C&quot;]
    
OBJECT.location.y = deltafst.y + chunky

chunky += chunkglobal

OBJECT = bpy.data.objects[&quot;D&quot;]
    
OBJECT.location.y = deltafst.y + chunky

chunky += chunkglobal