tofuannie Posted January 20, 2010 Author Posted January 20, 2010 Lee Mac, one more clean up thing. I thought I'd change my "nfcoff.lsp" to the same way you did with the "nfcon.lsp" using VL. Am I correct in changing the first line (defun c:nfcoff (/lay app) and the 12th line (vla-put-freeze lay :vlax-true)) in order to make them both match? Quote
Lee Mac Posted January 20, 2010 Posted January 20, 2010 I'm not sure what your nfcoff LISP does? Quote
tofuannie Posted January 20, 2010 Author Posted January 20, 2010 Lee, not to be greedy with your time, but I'll ask. Is it possible to actually "pick" a range of drawings from the first "wScript" run? I ask bc in the folder dialog box that comes up with wScript I might need to pick some drawings over other drawings that all reside in the same folder. Kind of like when I run the "script" line and it drills into the actual folder allowing me to pick a specific file. thanks Quote
tofuannie Posted January 20, 2010 Author Posted January 20, 2010 The "nfcoff" turns the "nfc" layer off, where the "nfcon" turned the layer on. Quote
Lee Mac Posted January 20, 2010 Posted January 20, 2010 Lee, not to be greedy with your time, but I'll ask. Is it possible to actually "pick" a range of drawings from the first "wScript" run? I ask bc in the folder dialog box that comes up with wScript I might need to pick some drawings over other drawings that all reside in the same folder. Kind of like when I run the "script" line and it drills into the actual folder allowing me to pick a specific file. thanks Hmmm.. thats not too easy. Could you not copy the drawings you want to process into a temporary folder? The "nfcoff" turns the "nfc" layer off, where the "nfcon" turned the layer on. Bear in mind that the code you originally posted and the VL code I posted thaws the layer and doesn't turn it on/off. These may give you some help: (defun c:nfcthaw (/ lay app) (vl-load-com) (if (not (vl-catch-all-error-p (setq lay (vl-catch-all-apply (function vla-item) (list (vla-get-layers (vla-get-ActiveDocument (setq app (vlax-get-acad-object)))) "tb|nfc"))))) (vla-put-[b][color=Red]freeze [/color][/b]lay :vlax-[b][color=Red]false[/color][/b])) (vla-ZoomExtents app) (vla-save (vla-get-ActiveDocument app)) (princ)) (defun c:nfcfrze (/ lay app) (vl-load-com) (if (not (vl-catch-all-error-p (setq lay (vl-catch-all-apply (function vla-item) (list (vla-get-layers (vla-get-ActiveDocument (setq app (vlax-get-acad-object)))) "tb|nfc"))))) (vla-put-[b][color=Red]freeze [/color][/b]lay :vlax-[b][color=Red]true[/color][/b])) (vla-ZoomExtents app) (vla-save (vla-get-ActiveDocument app)) (princ)) (defun c:nfcon (/ lay app) (vl-load-com) (if (not (vl-catch-all-error-p (setq lay (vl-catch-all-apply (function vla-item) (list (vla-get-layers (vla-get-ActiveDocument (setq app (vlax-get-acad-object)))) "tb|nfc"))))) (vla-put-[b][color=Red]layeron [/color][/b]lay :vlax-[b][color=Red]true[/color][/b])) (vla-ZoomExtents app) (vla-save (vla-get-ActiveDocument app)) (princ)) (defun c:nfcoff (/ lay app) (vl-load-com) (if (not (vl-catch-all-error-p (setq lay (vl-catch-all-apply (function vla-item) (list (vla-get-layers (vla-get-ActiveDocument (setq app (vlax-get-acad-object)))) "tb|nfc"))))) (vla-put-[color=Red][b]layeron [/b][/color]lay :vlax-[color=Red][b]false[/b][/color])) (vla-ZoomExtents app) (vla-save (vla-get-ActiveDocument app)) (princ)) Quote
tofuannie Posted January 20, 2010 Author Posted January 20, 2010 Yes, that would work...I can copy them to a temp folder and thanks for laying out the freeze/thaw and on/off differences for me. I promise I'm done! You've been so much help. Quote
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.