TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ScottMC on August 02, 2020, 05:57:53 PM

Title: Cut with basepoint
Post by: ScottMC on August 02, 2020, 05:57:53 PM
Re Name or category but finally tried and works using macro but would rather it be a vlisp as then it's repeatable, also would rather have multiple object selection. Thanks

Cut with BasePoint      
macro:       Copybase;\\\ erase _P;    <<-- now allows multi.. [just added another "\"]

As you can see, tests are helpful. Must have been in a hurry.
Still Lee Mac's Erase and Restore is powerful.

Wonder if anyone has insight into clipboard [ditto] usage as I can't seem to get but the last objects copied if copy isn't used... as far as objects, text works fine. Brings them in as images.
 
Title: Re: Cut with basepoint
Post by: tombu on August 07, 2020, 02:08:12 PM
With every Cut from File Explorer to Office applications the Cut items are never removed until they're pasted somewhere else to prevent them from being accidentally deleted. Once you've switched to another drawing to paste removing the objects from the previous drawing would be a challenge.

To avoid what could amount to a disaster I'll keep using Copybase (Ctrl+C) and deleting objects as needed after pasting elsewhere.

I have a dropdown in my Ribbon for Paste that includes a macro for Paste as Group that I use a lot:
Code: [Select]
^C^C_pasteblock;\(setq LstBlk(vla-get-Name (vlax-ename->vla-object (entlast))));_explode;_last;_-group;_create;*;;_previous;;(command "-purge" "B" LstBlk "N")
(setq LstBlk nil)

I'd love to see a safe way to Cut a group of objects from one drawing and Paste it into another that works the same other Windows programs if it can really be done.
Title: Re: Cut with basepoint
Post by: BIGAL on August 08, 2020, 01:14:32 AM
You can ctrl+c etc then ctrl+v between dwgs or use edit ? base point, paste as block ? all between dwgs.

Not sure about your statement.

Copyclip command.
Title: Re: Cut with basepoint
Post by: ScottMC on August 09, 2020, 10:51:53 AM
^C^C_Copybase;\\;erase;p;;; this knocks off with single selection. The only thing to make this better would to enable multiple/storage as with: Lee Mac's http://www.theswamp.org/index.php?topic=42007.msg471796#msg471796
..Solved the "Repeat using right-click" oops putting redraw at the end: ^C^C_Copybase;\\;erase;p;;redraw
Now, doin a micro search, found Acad has one called: CUTCLIPBP.
Title: Re: Cut with basepoint
Post by: ScottMC on June 13, 2021, 08:21:56 PM
Never givin up.. Works adequately for me. Here's the macro that works.
***  ID_CutWBase         [Cut with Basepoint]_copybase;\\\ erase _P;
Hope it'l help someone.
Title: Re: Cut with basepoint
Post by: ScottMC on June 29, 2021, 09:09:36 AM
Realizing now that window selection is the best type as when using any other, the copy looses any more than 2 directly selected. Eventually gonna have to write it into Lisp to ensure the many other selection options.
Added.. fixed the selection oops further with a push to window selection.. 
Code: [Select]
ID_CutWBase    [Cut with Basepoint]_copybase;\W;\\ erase;_P;