;自动智能加载autoload和autoload_user文件夹下所有arx文件
;根据不同版本的CAD智能判断并加载对应版本arx文件
(vl-catch-all-apply
	'(lambda ( / ee )
		(foreach ee
			(apply 'append
				(mapcar
					'(lambda(x)
						(mai_dos_dir
							(strcat mai_mini_path x)
							(cond
								((and (member mai_os_ver (list 0 1)) (= (strcase (getvar 'product)) "AUTOCAD")) "*.arx")
								((member mai_os_ver (list 2 3 4)) "*.brx")
								((member mai_os_ver (list 5 6)) "*.zrx")
								((member mai_os_ver (list -1 -2)) "*.grx")
							)
						)
					)
					(list "autoload\\" "autoload_user\\")
				)
			)
			(mai_load_files ee)
		)
	)
)
