(defun c:UI (/ UCSs fullpath srcdoc srcucss cnt name ucslst)

(setq UCSs

(vla-get-UserCoordinateSystems

(vla-get-activedocument (vlax-get-acad-object))))

(and

(setq fullpath (getfiled "Source File to Get UCS from" (getvar "dwgprefix") "dwg" 0))

(setq srcdoc (DocAtPath fullpath))

(setq srcucss (vla-get-UserCoordinateSystems srcdoc))

( (atoi (getvar "AcadVer")) 15)

(setq srcdoc (vla-GetInterfaceObject *acad* "ObjectDBX.AxDbDocument.16"))

(vla-open srcdoc path) ;returns nil

)

(T

(if (not (vl-registry-read

"HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID"?))

(startapp "regsvr32.exe" (strcat "/s \"" (findfile "axdb15.dll") "\""))

) ;if

(setq srcdoc (vla-GetInterfaceObject *acad* "ObjectDBX.AxDbDocument"))

(vla-open srcdoc path)

)

)

) ;if

srcdoc

) ;end
(c:ui)

Advertisements