I can think of a way, but it might get quite complicated for anything other than arcs, arcs would be simple.
A circle can be defined by 3 points on its perimeter. Therefore if you have 3 points of each polyline and spline, you can form the equation that defines the circle those three points would lie on. Then you can grab a 4th point, if its distance is within some tolerance to the equation of the circle formed by the first 3, you most likely have a circular spline or polyline. You can test with more points to be safe. Once you know that its a circle and its equation, just replace the entity with the circle entity described by the equation.
Where it gets complicated is that your splines are defined by control points and not fit points. Fit points would make this task easy, control points is another story. AutoCAD splines are B-splines, I have writen a python code that converts splines to polylines, which you can use to determine points along your splines and pass it through the algorithm I described above. This is using a python package called pyautocad, I think its way easier than lisp or VBA. In any case you can use the same logic and transcribe the code to another language. Hope this helps.
def my_B_spline(obj,resolution):
knots=obj.knots
points=obj.controlpoints
degree=obj.degree
mtx,numP=form_matrix(points)
def N(i,p,u):
if p==0:
if knots[i]<=u<knots[i+1]:
return 1
else:
return 0
else:
if not (knots[i+p]-knots[i])==0:
eq1=(u-knots[i])/(knots[i+p]-knots[i])
else:
eq1=0
if not (knots[i+p+1]-knots[i+1])==0:
eq2=(knots[i+p+1]-u)/(knots[i+p+1]-knots[i+1])
else:
eq2=0
return eq1*N(i,p-1,u)+eq2*N(i+1,p-1,u)
output=mtx[0]
for u in np.linspace(knots[0],knots[-1],num=resolution,endpoint=False)[1:]:
nextPoint=np.array([0,0,0],dtype='float')
for i in range(0,numP):
nextPoint+=N(i,degree,u)*mtx[i]
output=np.vstack([output,nextPoint])
return np.vstack([output,mtx[-1]])