See the top rated post in this thread. Click here

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Match Properties command, use the Settings option Luke

  1. #11
    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: Match Properties command, use the Settings option Luke

    I once wrote a lisp routine to change the colour and linetype of selected objects to bylayer and allow selection of a new target layer.
    The change colour and linetype (and ltscale) part really only needs a macro.

  2. #12
    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: Match Properties command, use the Settings option Luke

    Here it is.
    Note that the function name "REG" needs to be changed because "reg" is now an alias for the "region" command.

    Code:
    ;******************************************************************************
    ;REG.LSP by John A Bogie of FactorEdge Ltd. (01623-452726)
    ;October 1994.
    ;Change entities' layers and change colour and linetype to `bylayer'.
    ;******************************************************************************
    (defun regerr (s)
      (if (/= s "Function cancelled")    ; If an error (such as CTRL-C) occurs
          (princ (strcat "\nError: " s)) ; while this command is active...
      )
      (setq group1 nil)                  ; Free selection set
      (setvar "cmdecho" cmde)            ; reset sysvar 
      (setq *error* olderr )             ; Restore old *error* handler
      (princ)
    )
    ;******************************************************************************
    (defun c:reg ( / cmd group1 nlayer )
      (setq cmde (getvar "cmdecho"))
      (setvar "cmdecho" 0)
      (if *error*                         ; Set new error handler
        (setq olderr *error*) 
        (setq *error* regerr) 
      ) 
      (setq group1 (ssget))
      (setq nlayer (getstring "new layer: "))
      (command "chprop" group1 "" "la" nlayer "c" "bylayer" "lt" "bylayer" "")
      (setq group1 nil)
      (setvar "cmdecho" cmde)
      (setq *error* olderr)              ; Restore old *error* handler
      (princ)
    )
    ;******************************************************************************
    (princ "\n `REG' loaded: changes entity colour and linetype to `bylayer'.")
    (princ "\n Optionally changes entity layer.")
    (princ)
    ;******************************************************************************
    You may only need a script or macro based on the part in red.

  3. #13
    Member
    Join Date
    2007-02
    Location
    Dayton, F'n Ohio
    Posts
    9
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Thanks for the lisp, now if I only knew what to do with it. I'm just now getting back to AutoCAD after almost 7 years on Microstation. Haven't used, written or even seen these "lisp" thing's in action yet.

    Maybe I can figure it out. Any help from anyone is appreciated.

  4. #14
    Member
    Join Date
    2007-11
    Posts
    4
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Question - I use Match Prop a lot - but for some reason it won't recognize the command in the drawing I'm working on at this moment. It did on an earlier one today - but when I opened this one, it has stopped working.

  5. #15
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Quote Originally Posted by djani View Post
    Question - I use Match Prop a lot - but for some reason it won't recognize the command in the drawing I'm working on at this moment. It did on an earlier one today - but when I opened this one, it has stopped working.
    What happens if you use the command line option:
    ._matchprop

    (note the period and underscore)

  6. #16
    Woo! Hoo! my 1st post
    Join Date
    2007-10
    Posts
    1
    Login to Give a bone
    0

    Exclamation Re: Match Properties command, use the Settings option Luke

    For some reason my "match prop." stopped working as it used do. I checked the settings for it and they are still ok. Any suggestions? BTW, I am on Autocad 2009.
    thanks!

    caddiva

  7. #17
    Member
    Join Date
    2009-02
    Posts
    13
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    I know that this is an old post, but I'm currently experiencing issues with the matchprop command. Specifically, when I match text elements, it ignores the font. Is there a setting that I'm missing?

  8. #18
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Quote Originally Posted by sjankovic View Post
    I know that this is an old post, but I'm currently experiencing issues with the matchprop command. Specifically, when I match text elements, it ignores the font. Is there a setting that I'm missing?
    Are you dealing with MTEXT that has internal formatting?
    Like mtext using the text style named "BILLS TEXT" with an assigned font, but text within the mtext editor has been changed to another font?

    That may be the problem.

  9. #19
    Member
    Join Date
    2009-02
    Posts
    13
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Yes, it is mtext.

    It doesn't seem to matter if the text has been modified or is just set to a standard text style. Matchprop has no effect on it.

    Example, mtext is placed using a text style named CAD.
    When I match other mtext that is placed using a style named Standard nothing happens.

    Previously, it changed.

  10. #20
    All AUGI, all the time Richard.Kent's Avatar
    Join Date
    2001-01
    Location
    Albuquerque, NM, USA
    Posts
    622
    Login to Give a bone
    0

    Default Re: Match Properties command, use the Settings option Luke

    Quote Originally Posted by mporter View Post
    I am looking for a way to change an objects properties to what is set in the layer manager without having to draw a line and use match properties. .....
    You can select the objects you want to change, go up to the layer pull down and select the layer you want.

    I use a simple lisp routine to do exactly what you want.

    (defun C:CCC (/ ss cly)
    (setvar "cmdecho" 0)
    (setq cly (GETVAR "clayer"))
    (setq ss (ssget))
    (command "chprop" ss "" "la" cly "color" "bylayer" "lt" "bylayer" "")
    (setvar "cmdecho" 1)
    )

    Copy the above and save it in a text file named CCC.lsp to a folder on your harddrive. Since you are using autocad again you will want to have a folder for lisp files. I keep mine simple and have it at C:\ACAD.

    Now in AutoCAD start the APPLOAD command, pick on the Contents button in the lower right, pick add, navigate to the file, add, close, close. Now when you start autocad again in the future you will be able to type CCC, enter, pick objects and hit enter, they will be on the current layer.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Match Properties Command
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 3
    Last Post: 2012-06-12, 02:01 AM
  2. match properties custom command
    By mroth3270139 in forum AutoCAD Customization
    Replies: 4
    Last Post: 2010-08-12, 07:52 PM
  3. Match Properties During Offset Command
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2008-10-13, 12:09 PM
  4. Match Properties command: Selection Tools
    By E-Key in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2006-07-21, 06:43 PM
  5. Enhanced Match Properties Command
    By aggockel50321 in forum Revit Architecture - Wish List
    Replies: 5
    Last Post: 2004-01-15, 03:44 PM

Posting Permissions

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