Jump to content

I want Lisp to use -mapimport command with file path.... Thanks in advance


Recommended Posts

Posted

I want Lisp to use -mapimport command with the file path

111.PNG

222.PNG

Posted (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 by mhupp

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...