Eng.minamaged Posted April 11, 2023 Posted April 11, 2023 I want Lisp to use -mapimport command with the file path Quote
mhupp Posted April 11, 2023 Posted April 11, 2023 (edited) Updated from here. https://www.cadtutor.net/forum/topic/31962-batch-import-shape-files/?do=findComment&comment=258808 Don't have maps so your going to have to trouble shoot what is needed. (defun C:MAPMAPMAP (/ shpfile) (setq shpfile (getfiled "\nSelect a file: " (getvar 'DWGPREFIX) "kml,kmz" 16)) ;Starts in the drawing locaiton (command "-mapimport" "SHAPE" shpfile "n" "L" "S" (getvar 'clayer) "D" "C" "P" "P") ) Change the (getvar 'dwgprefix) to a location if you want to start at the same location every time. (setq shpfile (strcat (getenv "userprofile") "\\Documents\\")) ;this will default to documents in the user folder or (setq shpfile "C:\\Files\\mapstuff\\") or (setq shpfile "C:\\Files\\mapstuff\\file.mkl") Edited April 12, 2023 by mhupp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.