broncos15 Posted November 3, 2015 Share Posted November 3, 2015 I have a quick question about the matchprop command. Is there an easy to access the matchprop settings variable? I have looked everywhere and I can't seem to find what it is. As a result, I have been using this matchlayer lisp because the laymch command works backwards. My issue with the code is that I can't get it to function just like the matchprop command. Main issues: I don't know how to get entsel to go immediately to choosing the destination object after the source object is chosen, and I don't know how to get the lisp to preview what the destination object will look like like how the matchprop command does. Is there an easy fix that I am missing with this code, or even easier, a variable for matchprop I can mess with to make this lisp much simpler? Thank you in advance for the help! (defun c:matchlayer (/ ent entlay stuff) (setq ENT (entget (car (entsel "\nSelect entity on TARGET layer: ")))) (setq ENTLAY (cdr (assoc 8 ENT))) (setq TEXT '"Entity layer is ") (setq TITLE (strcat TEXT ENTLAY)) (prompt TITLE) (setq STUFF (SSGET)) (command "CHANGE" STUFF "" "Properties" "LAYER" ENTLAY "C" "bylayer" "LT" "bylayer" "S" "1.0" "") (PRINC) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 3, 2015 Share Posted November 3, 2015 (edited) my version (defun c:matchlayer (/ ent entlay stuff) (setq ENT (entget (car (entsel "\nSelect entity on TARGET layer: ")))) (setq ENTLAY (cdr (assoc 8 ENT))) (alert (strcat "Entity layer is " entlay)) (setq STUFF (SSGET)) (command "_chprop" STUFF "" "LAYER" ENTLAY "C" "bylayer" "LT" "bylayer" "S" "1.0" "") (PRINC) ) Edited November 4, 2015 by BIGAL Quote Link to comment Share on other sites More sharing options...
broncos15 Posted November 4, 2015 Author Share Posted November 4, 2015 my version (defun c:matchlayer (/ ent entlay stuff) (setq ENT (entget (car (entsel "\nSelect entity on TARGET layer: ")))) (setq ENTLAY (cdr (assoc 8 ENT))) (alert (strcat "Entity layer is " entlay)) (setq STUFF (SSGET)) (command "_chprop" STUFF "" "LAYER" ENTLAY "C" "bylayer" "LT" "bylayer" "S" "1.0" "") (PRINC) ) BIGAL, thank you for the help. I think the chprop command is better than my change command. I was curious, how does your code go from selecting the target layer to the destination layer without making the user hit enter? My original code seems almost identical, so I am curious how you did that. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 5, 2015 Share Posted November 5, 2015 Use of prompt maybe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.