samifox Posted March 29, 2018 Share Posted March 29, 2018 hi using acad 18 i need what the "Match" command is doing but without a scoure object. i have predefined set of properties i want to apply to existing objects. what is the way to automate it? Quote Link to comment Share on other sites More sharing options...
tombu Posted March 29, 2018 Share Posted March 29, 2018 You could modify this to whatever properties you want. ; Written By: Peter Jamtgaard 2002 ; This program will prompt the user to ceate a selection set. ; All objects in the selection set will have their color ; and linetype properties set to bylayer. (defun C:ByLayer (/ CNT EOBJ SSET) (princ "Select Entities to change") (setq SSET (ssget) CNT 0 ) (repeat (sslength SSET) (setq ENAM (ssname SSET CNT) CNT (1+ CNT) EOBJ (vlax-ename->vla-object ENAM) ) (vl-catch-all-apply 'vla-put-color (list EOBJ 256) ) (vl-catch-all-apply 'vla-put-linetype (list EOBJ "Bylayer") ) (vl-catch-all-apply 'vla-put-Lineweight (list EOBJ -1) ) (vl-catch-all-apply 'vla-put-PlotStyleName (list EOBJ "Bylayer") ) ) ) Quote Link to comment Share on other sites More sharing options...
samifox Posted March 29, 2018 Author Share Posted March 29, 2018 thanks ill give it a try Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 29, 2018 Share Posted March 29, 2018 Something like this that could be typed at the command line by modifying the previous code posted then its not hard coded. This would be about the same time as answering questions. (mychprop colour linetype layer freeze) (mychprop 3 "dashed" "22" "") use a "" as dont change but you must supply all 4 (mychprop "" "Continous" "" "") 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.