Jump to content

Script+Macro to change drawings


Recommended Posts

Ok, so I caved and made a Script+Macro combo to get my two thousand blocks sorted. At least a big part of them. This is what I got

 

Macro:

 

^C^Cscript "C:/Documents and Settings/<username>/Desktop/data.scr" ^C^Cm all ;\0,0,0  ^C^Cz e  ^C^Cchange;\ p LA Centrum  ^C^Cpurge all * n ^C^Cqsave 

 

Script:

 

snap off
grid off
-Layer
S
0
N
Centrum
LT
dashdot
Centrum
C
red
Centrum

change
all

P
LT
BYLAYER
Color
BYLAYER
LA
0

ltscale
1

 

Very basic, but it works with a minimum of fuss. But I have one thing that I can't seem to figure out. The Macro pauses for me to select which lines to change to Layer Centrum - but it doesn't accept a crossing box, or that I pick two objects. Can that be altered so I can do a crossing box?

Link to comment
Share on other sites

Oh, so not so strange that I couldn't figure it out if its not suppose to work :wink:

 

Updated macro below as per Seans instructions, works like a charm :)

 

 

^C^Cscript "C:/Documents and Settings/A403635/Desktop/data.scr" ^C^Cm all ;\0,0,0  ^C^Cz e  ^C^Cselect \change p  p LA Centrum  ^C^Cpurge all * n ^C^Cqsave 

Link to comment
Share on other sites

. . . .works like a charm :)

. . . .

 

 

 

Cool.

The process is a bit convoluted. As a matter of fact, I’m not sure the OP in that linked thread accepted the advice given by that excerpt.

Link to comment
Share on other sites

The process is a bit convoluted. As a matter of fact, I’m not sure the OP in that linked thread accepted the advice given by that excerpt.

 

well sure, its not the most straightforward of things (and I could almost bet my right hand that Lee will write soemthing smooth when he wakes up :wink: ) but it works, and I can listen to some mind-soothing music while I run it a gazillion times.

Link to comment
Share on other sites

I didn’t express myself particularly well. The phrase was referring to the different requirements for activation in command line versus menu macro (i.e., the need for Select).

I still think any specialized routine that can be “menu-macro”fied, should be. That allows its use in AutoCADLT.

Link to comment
Share on other sites

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