Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/17/2024 in all areas

  1. I wrote this program like four years ago (just for fun / exercise) and maybe used it once or twice so as we say here on Mars : guaranteed to the doorstep If it works : , if it doesn't ... As usual never wrote a manual so have fun experimenting. RlxBlockSync.lsp
    3 points
  2. Lee Mac has a blocks delete LISP which I think you can modify to remove user interaction https://lee-mac.com/deleteblocks.html for Lee Macs code Below to remove the block, note the c:blockdelbatch is as an example, removing the block revtriangle (as part of a list that you can add to). You need Lee Macs LISP above. And then just insert the new block. Can use something like Lee Macs script writer to do the batch processing. (defun c:blockdelbatch (/ deletelst) (setq deletelst (list "revtriangle")) (blksdelbatch deletelst) ) (defun blksdelbatch ( lst / *error* del lst ) (defun *error* ( msg ) (LM:endundo (LM:acdoc)) (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)) ) (princ) ) (cond ( t (LM:startundo (LM:acdoc)) (setq del (LM:DeleteBlocks (LM:acdoc) lst)) (vla-regen (LM:acdoc) acallviewports) (foreach block lst (if (member (strcase block) del) (princ (strcat "\nDeleted block " block ".")) (princ (strcat "\nUnable to delete block " block ".")) ) ) (LM:endundo (LM:acdoc)) ) ) (princ) ) Edit. Nearly forgot to say, if this is a simple single block, copy the bock to the clipboard and use (command "pasteclip" "0,0")
    1 point
  3. I wrote a post about auto executing a command in batch. It should work on this problem as well
    1 point
  4. @mhy3sx If you want my revision of the code I provided, you should like my reply... This way we know you are interested in topic you raised... If you still avoid to give encouragement I shell not post my revision... Thanks for attention and good bye...
    1 point
×
×
  • Create New...