(defun c:convert_arc_line ( / arc line)
(if (setq arc (ssget "_X" '((0 . "ARC")))) (command "_.pedit" "_m" arc "" "_Y" "") (princ (strcat "\nMohan there were no arc Object(s) found ... ")))
(if (setq line (ssget "_X" '((0 . "LINE")))) (command "_.pedit" "_m" line "" "_Y" "") (princ (strcat "\nMohan there were no line Object(s) found ... ")))
(princ (strcat "\nMohan total of " (itoa (sslength arc)) " Arc Object(s) & " (itoa (sslength line)) " Line Object(s) were converted to Polylines ... " ))
(princ))
Command: CONVERT_ARC_LINE
_.pedit
Select polyline or [Multiple]: _m
Select objects: 1 found
Select objects:
Convert Lines, Arcs and Splines to polylines [Yes/No]? <Y> _Y
Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]:
Command: _.pedit
Select polyline or [Multiple]: _m
Select objects: 2 found
Select objects:
Convert Lines, Arcs and Splines to polylines [Yes/No]? <Y> _Y
Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]:
Command:
Mohan total of 1 Arc Object(s) & 2 Line Object(s) were converted to Polylines ...
Command: CONVERT_ARC_LINE
Mohan there were no arc Object(s) found ...
Mohan there were no line Object(s) found ... ; error: bad argument type: lselsetp nil
Note: If there were no objects of (line or arc) why this error shows "error: bad argument..............
Please anyone help to fix it.