Clip Xref macro

Clip Xref macro

Code_x
Advocate Advocate
569 Views
8 Replies
Message 1 of 9

Clip Xref macro

Code_x
Advocate
Advocate

Hello, I'm in search of a macro for AutoCAD LT2020 that can carry out the following sequence of commands: select Xref, clip Xref, create new boundary, delete old boundary, and select polyline. This is the process I need to follow each time.

 

Also, if it's possible, I'd like a command that can clip Xref, form a new boundary, and choose a polyline.

 

I'm not certain about the methods for creating macros or how they are made, specifically for AutoCAD LT2020. If anyone can give advice that can be very helpful. 

 

Thank you. 

0 Likes
570 Views
8 Replies
Replies (8)
Message 2 of 9

pendean
Community Legend
Community Legend

LT2020's macro writing ability is too limited for your workflow need. Sorry.

 

Are you stuck in that older perpetual license or are you on subscription where LT2024 (now with LISP) that you can use instead?

0 Likes
Message 3 of 9

Code_x
Advocate
Advocate

I experimented with AutoCAD 2024, but my workflow efficiency didn't improve despite the somewhat positive macro action recorder. Furthermore, the 2024 version appeared to lag compared to LT2020, even though my computer is quite powerful. Consequently, I opted to revert to AutoCAD 2020LT for time being for better efficiency and am now figuring out some macros to accelerate my workflow. 

0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

@Code_x wrote:

.... select Xref, clip Xref, create new boundary, delete old boundary, and select polyline. .... 


Just do it manually, and put those inputs into a macro, with the usual macro syntax [read about that >HERE<, mostly in this case, ^C^C typically to start, to cancel any command that may be running, a \ for User input (selection of the Xref), a ; for Enter (completion of selection)].

Try this in a Tool Palette button:

 

^C^C_.XCLIP \;_new _yes _select

 

It counts on the fact that as you describe, there will always be an old boundary to delete.  If not, the "_yes" part will be the answer to a question that is not asked.

Kent Cooper, AIA
0 Likes
Message 5 of 9

pendean
Community Legend
Community Legend

@Code_x wrote:

I experimented with AutoCAD 2024, but my workflow efficiency didn't improve despite the somewhat positive macro action recorder....


 

Ah, that explains your other post about accessing ACTRECORD files in LT (not an option).

 

Full AutoCAD's Action Recorder regardless of year version is not a replacement for the much-quicker actions in LISP, it can be slow for sure as it is only repeating your long screen actions, and your stated need to be able to select/deselect objects mid-macro is not going to be foolproof in LT2020 (or any LT version from LT1 through LT2023).

 

Have you considered testing LT2024 to just doing more with LISP instead?

0 Likes
Message 6 of 9

KPerison
Collaborator
Collaborator

Here is a simple script file. You can modify for your situation.

Paste in the list of xrefs you want to clip.

If you don't need the draworder command delete the line.

Of course remove the .txt extension from the filename.

0 Likes
Message 7 of 9

Code_x
Advocate
Advocate

I am able to use AutoCAD LT2024 with Lisp commands. However, the issue I've encountered is that the files I work with exhibit lag when being operated in LT2024. I noticed basic commands, such as stretching and moving Xref, lag when compared to the LT2020 version. The ultimate goal was to transition to LT2024 and begin using a combination of action recording and Lisp. However, due to the encountered lag, I am aiming to create more Lisp commands in 2020LT.

0 Likes
Message 8 of 9

pendean
Community Legend
Community Legend

@Code_x wrote:

I am able to use AutoCAD LT2024 with Lisp commands. However, the issue I've encountered is that the files I work with exhibit lag when being operated in LT2024. I noticed basic commands, such as stretching and moving Xref, lag when compared to the LT2020 version. The ultimate goal was to transition to LT2024 and begin using a combination of action recording and Lisp. However, due to the encountered lag, I am aiming to create more Lisp commands in 2020LT.


Not seeing any lag whatsoever in LT2024 here: office full of users too. The LT2024 updates are not available to trial users (or are you on subscription) but you can...

 

1) Set GFXDX12 variable to 0 (that's a zero) then restart AutoCAD/LT2024: reverting to DirectX11 fixes similar problems for most users.

2) Also consider turning off LINESMOOTHING and LINEFADING variables.

 

3) If still no relief then start GRAPHICSCONFIG command and change the 2D Display Settings pulldown from "advanced mode" to one of the other choices.

HTH

0 Likes
Message 9 of 9

Code_x
Advocate
Advocate
Apparently, the issue was with the update of AutoCAD LT2024. Two updates were pending in the Autodesk app and after installing them, the lag issue is resolved. Thank you, it is functioning much better and I believe I can now execute scripts.
0 Likes