See the top rated post in this thread. Click here

Page 2 of 6 FirstFirst 123456 LastLast
Results 11 to 20 of 56

Thread: Button creation to import Layers

  1. #11
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by srb
    No, they didn't work either. I also tried it by taking out the spaces in the subdir name and the file name. It still won't get past just the network drive letter:

    Command: _.-Insert
    Enter block name or [?]: *"L:
    Forgive me today, I'm under the weather. Try placing the asterisk within the quotes.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  2. #12
    All AUGI, all the time SRBalliet's Avatar
    Join Date
    2004-06
    Location
    Near Christiansburg, VA Looking for a closer job!
    Posts
    500
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Sorry, still no go,

    I am now using:

    ^C^C^C^C_.-Insert;"*L:\\Data\\Drawing Templates\\Design Center.dwg";0,0;1;0;

    and still get:

    Command: _.-Insert
    Enter block name or [?]: *"L:

    (When taking out the spaces, I put the names of the subdir and file back with the spaces, since my tool pallettes are based on that path also)

    I appreciate your effort. I've been trying to figure this out for a day and a half.

  3. #13
    AUGI Director scott.wilcox's Avatar
    Join Date
    2015-11
    Location
    Edmonton, Alberta
    Posts
    990
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    I think your macro may need forward slashes instead of backslashes. Try substituting them and see if it works.

    Scott

  4. #14
    All AUGI, all the time SRBalliet's Avatar
    Join Date
    2004-06
    Location
    Near Christiansburg, VA Looking for a closer job!
    Posts
    500
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    That was it! Now I get past the L: drive and its giving me an "invalid file name" error, but that is a problem on my end. I will try to work on that now. Thanks to all.

  5. #15
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Why the asterisk?
    Are you trying to insert a block pre-exploded or are you just trying to "insert layers" as in the original question?
    If you only want the layers, there is no need to explode the block.

  6. #16
    Member
    Join Date
    2004-08
    Location
    Beautiful OH
    Posts
    29
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by KingBlads
    G'day

    I've just had a question posed through our user group website and as I haven't touched AutoCAD in a long time, so I thought it better to ask here...

    The question is...
    What I'm trying to do is to create a button that when pressed on a new drawing, it brings in all your layers. I know this can be done, but I don't know how to do it?

    Unfortunately I have no idea which version of AutoCAD they are running. Can anyone assist? Thanks in advance
    KingBlads,

    Why even make a button? Why not a new template drawing with all layers assigned, so that, they would already be set up at the beginning of the session without thinking about it?

    Or if you wanted a button...have a button create all the layers using lisp, that way you wouldn't be relying on a particular drawing.

    Paula

  7. #17
    AUGI Addict blads's Avatar
    Join Date
    2015-10
    Location
    out cycling somewhere... I wish...
    Posts
    2,285
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by paula.romano
    KingBlads,

    Why even make a button? Why not a new template drawing with all layers assigned, so that, they would already be set up at the beginning of the session without thinking about it?

    Or if you wanted a button...have a button create all the layers using lisp, that way you wouldn't be relying on a particular drawing.

    Paula
    Thanks for your comments but all I was doing was relaying a question... I'm glad I'm a reviteer as I no longer have to worry about layers, buttons, etc BUT I'll pass your comments along to the person who asked the question via my autocad LUG (I'm their webmaster...)
    Cheers @blads
    Mac Geek | Building Design Suite 2020 | Semi-Retired Building Designer / CAD-BIM Trainer | Autodesk Certified Professional

  8. #18
    I could stop if I wanted to LanceMcHatton's Avatar
    Join Date
    2002-04
    Location
    Las Vegas, NV, USA
    Posts
    303
    Login to Give a bone
    1

    Default Re: Button creation to import Layers

    Quote Originally Posted by KingBlads
    G'day

    I've just had a question posed through our user group website and as I haven't touched AutoCAD in a long time, so I thought it better to ask here...

    The question is...
    What I'm trying to do is to create a button that when pressed on a new drawing, it brings in all your layers. I know this can be done, but I don't know how to do it?

    Unfortunately I have no idea which version of AutoCAD they are running. Can anyone assist? Thanks in advance
    Another way to do it is to have the button execute a lisp that creates the layers. Not only does it create the correct layers, but it will fix layers that already exist but have the incorrect color or linetype.

    Button:
    ^C^C^P(load "L:/gcw-menus/lisp/GCWLayerSetMaster.lsp");LayerSetMaster

    Lisp:
    Code:
    (defun c:LayerSetMaster ()
      (setvar "cmdecho" 0)
      (setvar "filedia" 0)
      (setq oldlayer (getvar "clayer"))
      (setq oldexpert (getvar "expert"))
      (setvar "expert" 3)
      (command "-linetype" "l" "*" "L:/Linetype/gcw.lin" "")
      (command "-layer"
    	"m" "C-CURB-BACK" "c" "7" "" "l" "continuous" ""
    	"m" "C-CURB-TICK" "c" "220" "" "l" "continuous" ""
    	"m" "C-DRWY" "c" "21" "" "l" "continuous" ""
    	"m" "C-DRWY-PATT" "c" "253" "" "l" "continuous" ""
    	"m" "C-ESMT" "c" "41" "" "l" "G-ESMT" ""
    	"m" "C-ESMT-CNTL" "c" "2" "" "l" "CENTER2" ""
    	"m" "C-ESMT-SITE" "c" "60" "" "l" "G-ESMT" ""
    	"m" "C-ESMT-SITE-PATT" "c" "24" "" "l" "continuous" ""
    	"m" "C-LOTT" "c" "60" "" "l" "continuous" ""
    	"m" "C-PROP" "c" "11" "" "l" "PHANTOM2" ""
    	"m" "C-PROP-TICK" "c" "220" "" "l" "continuous" ""
    	"m" "C-ROAD-CNTL" "c" "2" "" "l" "CENTER2" ""
    	"m" "C-ROAD-EPMT" "c" "3" "" "l" "continuous" ""
    	"m" "C-ROAD-GDBK" "c" "41" "" "l" "HIDDEN2" ""
    	"m" "C-ROAD-RWAY" "c" "6" "" "l" "G-SMALLDASHPL" ""
    	"m" "C-ROAD-TICK" "c" "220" "" "l" "continuous" ""
    	"m" "C-SDWK" "c" "3" "" "l" "continuous" ""
    	"m" "C-SDWK-PATT" "c" "252" "" "l" "continuous" ""
    	"m" "C-SDWK-RAMP" "c" "2" "" "l" "continuous" ""
    	"m" "C-SETB" "c" "7" "" "l" "HIDDEN" ""
    	""
    	)
      (setvar "clayer" oldlayer)
      (setvar "filedia" 1)
      (setvar "expert" oldexpert)
      (princ)
    )

  9. #19
    All AUGI, all the time SRBalliet's Avatar
    Join Date
    2004-06
    Location
    Near Christiansburg, VA Looking for a closer job!
    Posts
    500
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Lance,

    Continuing on that theme, then I assume you could also add on/off, freeze/thaw, etc. information to the strings in the lisp routine?

    For example:

    "m" "C-DRWY" "c" "21" "" "l" "continuous" "F" "LO" ""

    Thanks

  10. #20
    AUGI Addict blads's Avatar
    Join Date
    2015-10
    Location
    out cycling somewhere... I wish...
    Posts
    2,285
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by LanceMcHatton
    Another way to do it is to have the button execute a lisp that creates the layers. Not only does it create the correct layers, but it will fix layers that already exist but have the incorrect color or linetype.
    Wow! How is that ... thanks very much
    Cheers @blads
    Mac Geek | Building Design Suite 2020 | Semi-Retired Building Designer / CAD-BIM Trainer | Autodesk Certified Professional

Page 2 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Import Family Parameter Set button.
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2013-07-24, 11:22 AM
  2. Button Creation for Scaling Viewports
    By cwjean76 in forum AutoCAD Customization
    Replies: 5
    Last Post: 2008-06-12, 09:49 PM
  3. Importing Layers Button?
    By Kal_digital in forum AutoCAD Customization
    Replies: 14
    Last Post: 2008-05-01, 07:23 PM
  4. Replies: 0
    Last Post: 2005-11-23, 01:22 PM
  5. Layers button
    By bob.kalsi66006 in forum ACA General
    Replies: 10
    Last Post: 2005-08-30, 11:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •