

(setq capcad_path "C:\\capcad-zwcad\\")


(defun CheckAddTrustedPath ( newPath / )
	(if (and (setq trusted (getvar 'trustedpaths))
		(not (vl-string-search newPath trusted))
		)
		(setvar 'trustedpaths
		(strcat (vl-string-right-trim ";" trusted) ";" newPath)
		)
	)
)


;zw nos
;(CheckAddTrustedPath (strcat capcad_path "..."))

(command "_.menuunload" "CAPROADS"); version brazil
(command "_.menuunload" "CAPCAD"); version english




(if (findfile (strcat capcad_path "capcad-br.cuix"))
(progn 
	(command "_.menuload" (strcat capcad_path "capcad-br.cuix"))
);progn
;else
	(alert "arquivo capcad-br.cuix nao encontrado - CERTIFIQUE-SE QUE SE ENCONTRA EM C:\capcad-zwcad")
)

(if (findfile (strcat capcad_path "CAPCAD_INI.zvb"))
(progn 
	(vl-vbaload (strcat capcad_path "CAPCAD_INI.zvb"))
	(command "_.vbarun" "LoadAll")
);progn
;else
	(alert "arquivo CAPCAD_INI.zvb nao encontrado - CERTIFIQUE-SE QUE SE ENCONTRA EM C:\capcad-zwcad")
)

