Jump to content

Recommended Posts

Posted (edited)

Question in code..

 

(defun c:CopyRegionEdge (/ ss) ;; AI.. https://www.google.com/search?q=copy+region+edge+segment%2C+autolisp&client=firefox-b-1-e&hs=LJSp&sca_esv=28d160b4388e87a1&biw=1143&bih=530&ei=t2enadf8OfXIp84PyJ69kA8&ved=0ahUKEwiXtPqy6oSTAxV15MkDHUhPD_I4ChDh1QMIEQ&uact=5&oq=copy+region+edge+segment%2C+autolisp&gs_lp=Egxnd3Mtd2l6LXNlcnAiImNvcHkgcmVnaW9uIGVkZ2Ugc2VnbWVudCwgYXV0b2xpc3AyCBAAGIAEGKIEMgUQABjvBTIFEAAY7wUyBRAAGO8FMgUQABjvBUjeM1C3D1iRLnABeACQAQCYAYgIoAHMC6oBBzAuNC43LTG4AQPIAQD4AQGYAgagApcNwgIIEAAYsAMY7wXCAgoQIRigARjDBBgKmAMAiAYBkAYFkgcHMS40LjYtMaAH0BCyBwcwLjQuNi0xuAffDMIHBzItMS4zLjLIB2uACAA&sclient=gws-wiz-serp
   ;; micro altered..
  (princ "\nSelect Region to Copy Edge From: ")
  
(setvar 'cmdecho 0)
  
  (if (setq ss (ssget ":S" '((0 . "REGION"))))
    
    (progn
    
	    (command "_.copybase" "0,0,0" ss "") ;; copy region to clipbrd
	    
	    (command "chprop" ss "" "c" 252 "") ;; change color
	    
	;;; ???????????
	    
	    (command "_.explode" ss)     ;; make segs accessable <not a selection set> 
	    
	   (princ "\nSelect Region Seg to Copy ")
	    
	    (command "_.copy" (ssget ":S") "" "\\" "\\") ;; select seg +copy +move
	    
	    (command "_.erase" ss "")
	    
	    (princ "\nSelect Items to Remove..") ;; <- my only known method
	    
	    (command "_.erase" "w" "\\" "\\" "") ;; <- manual erase :(
      
	    ;; ...  SEEING AS MY AUTOLISP EXPERIENCE SUCKS ..
	    ;;  how can the eXploded region / lines etc, be ERASED/selected ? 
	    ;; how to: make a selection set?
      
	    (command "chprop" "_L" "" "c" "bylayer" "") ;; ch copied to bylayer
    )
  )
  (command "_.pasteclip" "0,0,0") ;; re.place original region
  
  (setvar 'cmdecho 1) 
  (princ)
)

 

Edited by ScottMC
..

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...