Jump to content

Adding objects to layers - FNG here


bgood2go

Recommended Posts

Cool...thnx Dadgad -- hey, since I am in learning mode might as well learn the easier way to do it if it works well. Is this just a plug-n-play (load) or is there backend customization to be done before using?

Link to comment
Share on other sites

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • bgood2go

    10

  • rkent

    7

  • f700es

    5

  • Dadgad

    4

Top Posters In This Topic

Posted Images

I am a huge fan of Lee Mac's .....

 

http://www.lee-mac.com/layerdirector.html

 

 

 

Hey Dadgad, what commands have you coded in there, these were the ones I thought of but there may be others that I haven't considered?

 

(setq *LayerData*
  '(
    ("*TEXT"           "M-ANNO"  7)
    ("*DIM*,*QLEADER"  "M-DIMS" 7)
    ("*VPORT*"         "M-VIEW"  42)
    ("*MVIEW*"         "M-VIEW"  42)
    ("*MLEA*"          "M-ANNO"  7) ;mleader
    ("*NEWOR*"         "M-ANNO"  7) ;newwork custom command
    ("RAY*"           "XLINE"  142) ;
    ("*REV*"           "M-ANNO"  7) ;revcloud
    ("*TABL*"          "M-ANNO"  7) ;table
    ("*WIPEO*"         "M-VIEW"  251) ;wipeout
    ("*XATT*"          "XREF"  7)   ;xref attach
    ("*XLIN*"          "XLINE"  142) ;xline
    )
 )      

 

I just added HATCH, not sure how I missed that one.

Link to comment
Share on other sites

Cool...thnx Dadgad -- hey, since I am in learning mode might as well learn the easier way to do it if it works well. Is this just a plug-n-play (load) or is there backend customization to be done before using?

 

Edit: I should have just sent you here for loading the lisp file. http://www.lee-mac.com/runlisp.html

 

The file he mentioned is a lisp file so it is fairly easy to implement.

First you are going to want to create a Folder for lisp files, I use C:\ACAD\LSP. You can set that up anywhere you like.

Second download the file from the link he posted, save the file to your folder from step one.

Third, with AutoCAD open start the APPLOAD command, in the lower right pick on Startup Suite Contents button, navigate to the layerdirector.lsp (the one you just downloaded and placed in your new folder). Close the dialog box.

The next time you start a drawing you will be able to type LD, watch the command line as it should say Layer Director Disabled, hit enter and it will be enabled. It should be enabled when you first start the drawing.

 

Now you have to customize the file for your layers, colors, commands. Look at my post just above, may be #20. Open the layerdirector.lsp file in notepad or another simple text editor. Find the similar section in your file and adjust accordingly.

 

("*TEXT" "M-ANNO" 7)

The first entry is the command so for this example anything with text in the command will cause this file to fire and set the M-ANNO layer current with a color of 7. If you want another layer and color then change those accordingly. Save the file and the next time you open a drawing the changes will be working.

 

You can drag and drop the layerdirector.lsp file from the Windows file explorer into the graphics screen in AutoCAD to reload the program for the current file.

 

Digest that and let us know if you have any questions.

Link to comment
Share on other sites

Thanks much. Doesn't sound too bad....I'lll give it go and let ya know.

 

It is really easy, and you will be very glad you did it. :)

Link to comment
Share on other sites

Hey Dadgad, what commands have you coded in there, these were the ones I thought of but there may be others that I haven't considered?

 

(setq *LayerData*
  '(
    ("*TEXT"           "M-ANNO"  7)
    ("*DIM*,*QLEADER"  "M-DIMS" 7)
    ("*VPORT*"         "M-VIEW"  42)
    ("*MVIEW*"         "M-VIEW"  42)
    ("*MLEA*"          "M-ANNO"  7) ;mleader
    ("*NEWOR*"         "M-ANNO"  7) ;newwork custom command
    ("RAY*"           "XLINE"  142) ;
    ("*REV*"           "M-ANNO"  7) ;revcloud
    ("*TABL*"          "M-ANNO"  7) ;table
    ("*WIPEO*"         "M-VIEW"  251) ;wipeout
    ("*XATT*"          "XREF"  7)   ;xref attach
    ("*XLIN*"          "XLINE"  142) ;xline
    )
 )      

 

I just added HATCH, not sure how I missed that one.

 

You have added way more of these than I have.

 

The one which I have wanted to add, but don't know how to .....

 

..... would create a new XREF layer for each new XREF attachment,

styled after the 0 layer,

the layer name of which would be Xref * , where the asterisk represents the name of the Xref'd item.

 

But I absolutely love this lisp it is always enabled, runs in my startup suite or toolbox, as it used to be called.

Thanks Lee! :beer:

Edited by Dadgad
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...