+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 21 to 30 of 45
  1. #21
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by TimZilla View Post
    is that a reply to me? if so I would love if you could be more specific because im still a newbie at this, lol. I dont know where my acaddoc.Isp is, what it is, or what to do with it.
    <It will only work in full Acad, not LT>
    At the command line enter (findfile "acaddoc.lsp")
    If the file is found, open the file with Notepad and enter the above code and save.
    If it returns nil, start a new file with Notepad, enter the above code, and save as acaddoc.lsp in the support folder of Autocad.

    After you start acad, entering w enter will set the Wall layer current. Copy the code and edit for each layer you want.

    If you also want to set the osnap settings and layer you can do something similar to this

    Code:
    (defun c:w ()
    (setvar "clayer" "wall")
     (setvar "osmode" (+ 16384 3))
    )
    


    The osnap setting is determined by the red 3 in the code. Edit it to your desired osnap settings, it should be the sum of bitcodes shown below. e.g. Mid+Endpoint = 3 Center+Mid = 6

    0 NONe
    1 ENDpoint
    2 MIDpoint
    4 CENter
    8 NODe
    16 QUAdrant
    32 INTersection
    64 INSertion
    128 PERpendicular
    256 TANgent
    512 NEArest
    1024 QUIck
    2048 APParent Intersection
    4096 EXTension
    8192 PARallel
    Last edited by lpseifert; 8th Mar 2008 at 07:28 pm.

  2. #22
    Luminous Being dbroada's Avatar
    Computer Details
    dbroada's Computer Details
    Operating System:
    Windows 7 Professional
    Computer:
    Dell
    CPU:
    Intel Xeon E5-1603@2,80GHz
    RAM:
    4GB
    Graphics:
    NVIDA Quadro K600
    Monitor:
    DELL 23" & SAMSUNG 21"
    Using
    not applicable
    Join Date
    Nov 2005
    Location
    Kenley, Surrey, UK
    Posts
    5,644

    Default

    Quote Originally Posted by TimZilla View Post
    At work I use Auto Cad 2007. no LT, sorry ill go change that now.
    In that case you can create your own toolbar and put your own layer settings on each button. I can't help you as I'm at home and don't trust my memory. Have a look in the FAQ to see if there is a "create a toolbar" section or look for similar threads.

    lpseifert was demonstrating how to add a command into AutoCAD by modifying one of LISP routines that is loaded every time you start AutoCAD. Another trick worth investigating.
    "That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
    "Everything in drafting is logical. Except what isn’t." - Gavin Guile. (from the Lightbringer series of books by Brent Weeks)

    Dave

  3. #23
    Senior Member TimZilla's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2008
    Location
    North Carolina
    Posts
    120

    Default

    Quote Originally Posted by lpseifert View Post
    I just noticed you are running LT so the above won't work...
    yes, just changed that in my profile. I do use regular AutoCad, the full version. At work i was supposed to be trained on this stuff but im having to learn as I produce jobs. Although I'm a rookie I'm still bringing jobs in under hours. The other three guys I work with are trainee's as well and I like to take extra steps to stay above of them. Finding out ways to do stuff like you speak about would make me the top dawgy when it comes to raise time!

  4. #24
    Senior Member TimZilla's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2008
    Location
    North Carolina
    Posts
    120

    Default

    Quote Originally Posted by lpseifert View Post
    <It will only work in full Acad, not LT>
    At the command line enter (findfile "acaddoc.lsp")
    If the file is found, open the file with Notepad and enter the above code and save.
    If it returns nil, start a new file with Notepad, enter the above code, and save as acaddoc.lsp in the support folder of Autocad.

    After you start acad, entering w enter will set the Wall layer current. Copy the code and edit for each layer you want.

    If you also want to set the osnap settings and layer you can do something similar to this

    Code:
    (defun c:w ()
    (setvar "clayer" "wall")
    (setvar "osmode" (+ 16384 3))
    )
    
    [color=Magenta][color=Black]

    The osnap setting is determined by the red 3 in the code. Edit it to your desired osnap settings, it should be the sum of bitcodes shown below. e.g. Mid+Endpoint = 3 Center+Mid = 6

    First, I would like to say Thank you very much. It worked very well. So cool being able type w+enter and be in my walls layer just like that. One thing I am having trouble with though is...

    they way you have the code works by turning the correct snaps although osnaps is off. how to I get it to where the osnaps is already on when I turn my layer on.

    also, as I said i have a bunch of buttons on my toolbars that turn certain layers on when you click them. Its HydraCAD. those come with preset osnaps and ortho on and polar off. Would you happen to know how to edit those?

    this is very cool man and I thank all of you guys who help very much.

  5. #25
    Senior Member TimZilla's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2008
    Location
    North Carolina
    Posts
    120

    Default

    another quick one.

    (defun c:w ()
    (setvar "clayer" "wall")
    (setvar "osmode" (+ 16384 3))
    )



    this "clayer" iswhat i type in to make a hotkey for a layer right?
    what do i type in if i want to make a certain command a hot key?
    would it be "ccommand" ? would it be in the same format and under the same notepad acaddoc?

    (defun c:t ()
    (setvar "ccommand" "trim")

    would that work?


  6. #26
    Super Moderator Cad64's Avatar
    Computer Details
    Cad64's Computer Details
    Operating System:
    Windows 7 Profesional x64
    Computer:
    XI Computers
    Motherboard:
    Asus P8Z77-V Pro
    CPU:
    Intel Core I7 3770K 4.1 Ghz Quad Core 3rd Gen
    RAM:
    24GB DDR3 @ 1333MHz
    Graphics:
    Nvidia GeForce GTX 570 1280MB GDDR5
    Primary Storage:
    SATAII 500GB 7200 RPM
    Secondary Storage:
    Western Digital My Book Studio Edition II - 2TB capacity
    Monitor:
    HPf2105 21" LCD Widescreen & Cintiq 21ux
    Discipline
    Multi-disciplinary
    Cad64's Discipline Details
    Occupation
    Freelance Digital Artist
    Discipline
    Multi-disciplinary
    Details
    3D model building, texturing and rendering. Photoshop Color Graphics.
    Using
    AutoCAD 2014
    Join Date
    Feb 2006
    Location
    Southern California
    Posts
    10,176

    Default

    There is already a command alias for the Trim command. It's TR. Check your acad.pgp file for a list of all the command keyboard shortcuts. Tools Menu > Customize > Edit Program Parameters(acad.pgp)
    CGSociety Portfolio: http://rdeweese.cgsociety.org/
    Facebook:
    https://www.facebook.com/rdeweese67/


    "Work Smart, Not Hard"

  7. #27
    Luminous Being dbroada's Avatar
    Computer Details
    dbroada's Computer Details
    Operating System:
    Windows 7 Professional
    Computer:
    Dell
    CPU:
    Intel Xeon E5-1603@2,80GHz
    RAM:
    4GB
    Graphics:
    NVIDA Quadro K600
    Monitor:
    DELL 23" & SAMSUNG 21"
    Using
    not applicable
    Join Date
    Nov 2005
    Location
    Kenley, Surrey, UK
    Posts
    5,644

    Default

    as Cad has said, look at your PGP file, most of the AutoCAD commands have a "shortcut" already defined there. If you have express tools installed there is a section for something like "command alias editor" - check that out.

    What lpsiefert has shown is how to create a brand new command, in this case called W. All it does is change a number of system variables. In this case Current LAYER and the snap setting. You can use this method to create other commands or modify existing ones but you need to be certain of what you are doing as it is possible to disable (for example) the save command with nasty consequences.
    "That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
    "Everything in drafting is logical. Except what isn’t." - Gavin Guile. (from the Lightbringer series of books by Brent Weeks)

    Dave

  8. #28
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Quote Originally Posted by TimZilla View Post

    they way you have the code works by turning the correct snaps although osnaps is off. how to I get it to where the osnaps is already on when I turn my layer on.
    Code:
    (defun c:w ()
    (setvar "clayer" "walls")
    (setvar "osmode" 3)
    )
    

    Let me break it down for you...
    (defun c:w () Define a new command named w
    (setvar "clayer" "walls") Set the variable clayer [current layer] to Walls
    (setvar "osmode" 3) Set the variable osmode [osnap mode] to 3
    ) End of function definition

    (defun c:t ()
    (setvar "ccommand" "trim")

    would that work?

    Nope. As Cad64 pointed out there is an alias (shortcut) already defined for trim in your acad.pgp file (and a whole lot more), and that is the best way to make an alias for a single command.
    That being said, here is an alternative method per your question
    Code:
    (defun c:t ()
    (command "trim")
    )
    This method works if you want to add an option to the command, e.g. Zoom > Extents
    Code:
    (defun c:ze ()
    (command "zoom" "e")
    )
    Last edited by lpseifert; 9th Mar 2008 at 02:39 pm.

  9. #29
    Senior Member TimZilla's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2008
    Location
    North Carolina
    Posts
    120

    Default

    My layer Isolate is different on 08 than 07. On 07 it isolates the layer I pick by turning all the other layers off. On 08 it isolates the layer I pick by locking every other layer. I know this might be a better way for most. I use it for pipe sizing, if i have to make a change .I isolate just the pipe sizes, highlight all of them, hit properties and change them all at once. Using 08 with the lock feature it wont let me do that. Is there any way I can change it to where it turns it off instead of locking it?

  10. #30
    Super Moderator Cad64's Avatar
    Computer Details
    Cad64's Computer Details
    Operating System:
    Windows 7 Profesional x64
    Computer:
    XI Computers
    Motherboard:
    Asus P8Z77-V Pro
    CPU:
    Intel Core I7 3770K 4.1 Ghz Quad Core 3rd Gen
    RAM:
    24GB DDR3 @ 1333MHz
    Graphics:
    Nvidia GeForce GTX 570 1280MB GDDR5
    Primary Storage:
    SATAII 500GB 7200 RPM
    Secondary Storage:
    Western Digital My Book Studio Edition II - 2TB capacity
    Monitor:
    HPf2105 21" LCD Widescreen & Cintiq 21ux
    Discipline
    Multi-disciplinary
    Cad64's Discipline Details
    Occupation
    Freelance Digital Artist
    Discipline
    Multi-disciplinary
    Details
    3D model building, texturing and rendering. Photoshop Color Graphics.
    Using
    AutoCAD 2014
    Join Date
    Feb 2006
    Location
    Southern California
    Posts
    10,176

    Default

    Registered forum members do not see this ad.

    I believe CarlB already gave you the answer to this question in your other thread?
    http://www.cadtutor.net/forum/showthread.php?t=21048

    Initiate the LAYISO command, then type S for Settings. This will allow you to specify whether you want the other layers to be locked and faded or just turned off like in previous versions. Watch your command line.
    CGSociety Portfolio: http://rdeweese.cgsociety.org/
    Facebook:
    https://www.facebook.com/rdeweese67/


    "Work Smart, Not Hard"

Similar Threads

  1. Hot keys
    By LSR in forum AutoCAD General
    Replies: 7
    Last Post: 30th Nov 2007, 07:27 am
  2. Shortcut keys
    By JBS in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 10th May 2006, 07:27 pm
  3. customizing keys
    By gortex in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 13th Apr 2006, 04:15 pm
  4. Symbols and short cut keys
    By MSAWIN in forum AutoCAD Drawing Management & Output
    Replies: 5
    Last Post: 30th Mar 2006, 11:58 am
  5. short cut keys
    By jbruno in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 22nd Jun 2003, 04:32 pm

Bookmarks

Posting Permissions

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