MikeP Posted April 13, 2009 Posted April 13, 2009 how can I set the construction lines to always come out as red. what do I need to enter in the macro in the CUI to do this? Quote
ReMark Posted April 13, 2009 Posted April 13, 2009 You would have to put your construction lines on a layer (Construction?) that has its layer color set to red as the default. Quote
MikeP Posted April 13, 2009 Author Posted April 13, 2009 You would have to put your construction lines on a layer (Construction?) that has its layer color set to red as the default. how do I do that? Quote
Lee Mac Posted April 13, 2009 Posted April 13, 2009 You could always use a reactor to automatically switch to the correct layer when you use xline command: (vl-load-com) (if (not layer:reactor) (setq layer:reactor (vlr-command-reactor nil '((:vlr-commandWillstart . sCom) (:vlr-commandEnded . eCom) (:vlr-commandCancelled . cCom))))) (or (tblsearch "LAYER" "CONSTRUCTION") (vla-put-Color (vla-add (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))) "CONSTRUCTION") acRed)) (defun sCom (Reac Args) (setq oldlay (getvar 'CLAYER)) (if (eq "XLINE" (car Args)) (setvar 'CLAYER "CONSTRUCTION")) (princ)) (defun eCom (Reac Args) (if (eq "XLINE" (car Args)) (setvar 'CLAYER oldlay)) (princ)) (defun cCom (Reac Args) (if (eq "XLINE" (car Args)) (setvar 'CLAYER oldlay)) (princ)) Just put this in your ACADDOC.lsp or Start-up Suite HTH Lee 1 Quote
Lee Mac Posted April 13, 2009 Posted April 13, 2009 Or, a simpler version to be used - perhaps in a macro button: (or (not (tblsearch "LAYER" "CONSTRUCTION")) (setvar "CLAYER" "CONSTRUCTION")) (command "_xline") (while (> (getvar "CMDACTIVE") 0) (command pause)) Quote
uddfl Posted April 13, 2009 Posted April 13, 2009 Something like this, assuming you use a layer called "CONSTRUCTION" ^C^C-LAYER M CONSTRUCTION C 1; ; ; XLINE Quote
MikeP Posted April 13, 2009 Author Posted April 13, 2009 this worked just perfect thanks You could always use a reactor to automatically switch to the correct layer when you use xline command: (vl-load-com) (if (not layer:reactor) (setq layer:reactor (vlr-command-reactor nil '((:vlr-commandWillstart . sCom) (:vlr-commandEnded . eCom) (:vlr-commandCancelled . cCom))))) (or (tblsearch "LAYER" "CONSTRUCTION") (vla-put-Color (vla-add (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))) "CONSTRUCTION") acRed)) (defun sCom (Reac Args) (setq oldlay (getvar 'CLAYER)) (if (eq "XLINE" (car Args)) (setvar 'CLAYER "CONSTRUCTION")) (princ)) (defun eCom (Reac Args) (if (eq "XLINE" (car Args)) (setvar 'CLAYER oldlay)) (princ)) (defun cCom (Reac Args) (if (eq "XLINE" (car Args)) (setvar 'CLAYER oldlay)) (princ)) Just put this in your ACADDOC.lsp or Start-up Suite HTH Lee 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.