Jump to content

Recommended Posts

Posted

I know I'm too late, but there is a simple method of creating dumb lisp scripts (no programming skills required). If someone can use autocad command line then he/she can write scripts like this one.

An example of renaming 3 layers (aaa, bbb, ccc -> AAA, BBB, CCC)

 

(defun c:renlay ()
     (command "-layer" "r" "aaa" "AAA" "")
     (command "-layer" "r" "bbb" "BBB" "")
     (command "-layer" "r" "ccc" "CCC" "")
)

How it was built?

1. type -layer in command line

2. hit "r" for rename

3. type layer name to be changed "aaa"

4. type new layer name "AAA"

5. hit enter "" to exit the command

6. merge it all together into "-layer" "r" "aaa" "AAA" ""

7. add (command in front and add a closing bracket

8. done!

 

I often use that kind of lisp for plotting:

 

(command "-plot"     "Y"         ""
        "plotter_name_here" "A1"
        "M"     "L"         "N"     "E"
        "F"     "C"         "Y"     "A1_COLOR.CTB"
        "Y"     "N"         "N"     "N"
        "N"     "N"         "Y"
)

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • Rubbersnow

    10

  • steven-g

    6

  • ReMark

    4

  • rkent

    2

Popular Days

Top Posters In This Topic

Posted

thank you all for the help . Tomorrow I will try the other method as well. After all we are trying to work as productive and as fast as we can, and I'm sure that every of the methods have its own advantages \m/ cheers

Posted
thank you all for the help . Tomorrow I will try the other method as well. After all we are trying to work as productive and as fast as we can, and I'm sure that every of the methods have its own advantages \m/ cheers

 

I think the lisp ReMark posted is the fastest way to go of the methods given in here so far. There may be a way to process the drawing without opening it up but that is something for BlackBox or Lee-Mac to handle.

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