Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have standard layer A B C AND D i draw object use the standard layer a b c i did not use layer D find the Missing layer in msgbox
(defun C:FindMissingLayers (/ standardLayers existingLayers missingLayers)
(setq standardLayers '("A" "B" "C" "D")) ; Define your standard layers here
(setq existingLayers '())
(foreach layer standardLayers
(if (tblsearch "LAYER" (strcat "ACAD_LAYER:" layer))
(setq existingLayers (cons layer existingLayers))
)
)
(setq missingLayers (vl-remove-if '(lambda (x) (member x existingLayers)) standardLayers))
(if (null missingLayers)
(alert "No missing layers found.")
(alert (strcat "Missing layers: " (apply 'strcat (mapcar '(lambda (x) (strcat x ", ")) missingLayers))))
)
)
Solved! Go to Solution.