- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Being a gluten for punishment I am working on a third script because this one is now important for our current marching orders.
Was trying to make a simple script to changes objects from one layer to another using laymrg which was fairly straight forward. I spend most of my day yesterday with no success to add functionality to either pause a command to select certain objects on a layer as other objects to convert them to a different layer. Example: the drawings I am useing have both the dining room furniture and the kitchen equipment on the same layer. I want to separate those objects while in the routine just because it would be nice to not have to do that separately outside the lisp routine.
;;; Wendy's Custom Function
;;; Tip: Wenlay.lsp wenlay (c) Chris Miske
;;; Credits for assistance:
;;; Sets layers for walls, doors, glazing, etc.. of CAD scans to Wendy's layer standards
;;; May/2020
(defun C:wenlay(/ selset1 i output1)
(setq sellst1 '())
(command "._clayer" "0")
(setvar 'CELTYPE "ByLayer")
(setvar 'CECOLOR "ByLayer")
(command "laymrg" "T" "A-GLAZ" "" "t" "A-Glaze-E" "y")
(command "laymrg" "T" "A-DOOR" "" "t" "A-Door-E" "y")
(command "laymrg" "T" "A-WALL" "" "t" "A-Wall-E" "y")
(command "laymrg" "T" "P-SANR-FIXT" "" "t" "Q-Equip-E" "y")
(command "pselect" pause) ;one of many attenpts to meke selecting object to work
;(command "change" pause "p" "la" "Q-Equip-E" "")
;
;(command "change")
;(while (= 1 (getvar "cmdactive"))
;(command pause))
;(command "p")
;(command "la")
;(command "Q-Equip-E")
;(command "")
(princ)
)
(princ)
I had tried multiple variations of calling ssget as well as a way to hold selected objects to hold and run the change command on with no success but have deleted every attempt.
Solved! Go to Solution.