(cond
	((not (null mai_start)))
	((findfile "_-load.lsp") (load "_-load.lsp"))
	((wcmatch (strcase (getvar 'product)) "*BRICSCAD*") (if (findfile "IMINI.des") (load "IMINI.des")))
	((wcmatch (strcase (getvar 'product)) "*ZWCAD*") (if (findfile "IMINI.zelx") (load "IMINI.zelx")))
	((wcmatch (strcase (getvar 'product)) "*AUTOCAD*,*GSTARCAD*") (if (findfile "IMINI.fas") (load "IMINI.fas")))
)
;加载建筑谜你工具

(vl-catch-all-apply
	'(lambda ( / nn lfile tmp)
		(mai_add_path mai_mini_path (list "Dwgs_lib" "fonts" "autoload" "autoload_user" "pattern" "Plus_lib" "1_lsp" "用户设置" "menu"))
		(setq nn (strcat mai_mini_path "pattern\\"))
		(mai_add_path nn (mai_dos_subdir nn nil))
		(foreach tmp (list "AUTOLOAD\\" "AUTOLOAD_USER\\") ;自动加载AUTOLOAD目录下的lsp、vlx和fas文件 des
			(setq tmp (strcat mai_mini_path tmp))
			(and
				(vl-file-directory-p tmp)
				(setq nn (append
							(mai_dos_dir tmp "*.lsp")
							(if (< mai_os_ver 2) (mai_dos_dir tmp  "*.vlx"))
							(if (< mai_os_ver 2) (mai_dos_dir tmp "*.fas"))
							(if (< 1 mai_os_ver 5) (mai_dos_dir tmp "*.des"))
							(if (> mai_os_ver 4) (mai_dos_dir tmp "*.vls"))
							(if (> mai_os_ver 4) (mai_dos_dir tmp "*.zelx"))
						)
				 )
				 (foreach lfile nn (vl-catch-all-apply 'load (list (strcat tmp lfile))))
			)
		)
		(mai_change_user (car (mai_get_current_user)))
		;(setq nn 0)
		;(foreach tmp (mai_str2lst (strcase (getenv "ACAD")) ";")
		;   (and (setq lfile (findfile (strcat tmp "\\acad.lsp")))
		;        (< nn 3)
		;        (setq nn (1+ nn))
		;        (load lfile)
		;   )
		;)
		;  加载路径下其他acad.lsp文件
	)
	nil
)
  (princ)

