0 Members and 1 Guest are viewing this topic.
;;;Changes the crosshairs to Red when switching to pspace;;;changes back to white when in current vport or modelspace;;;To Install, change the name of this file to AcadDOC.lsp & add to the acad support directory (vl-load-com)(or Me:Svr (setq Me:Svr (VLR-SysVar-Reactor nil '((:VLR-sysVarChanged . MeChangeCrosshairColor)) ) )) (or Me:Dmr (setq Me:Dmr (vlr-DocManager-reactor nil '((:VLR-documentToBeDestroyed . MeDoCloseStuff)) ) ))(defun MeDoCloseStuff (Rea Arg) (mapcar 'VLR-remove (list Me:Svr Me:Dmr)) (setq Me:Dmr nil Me:Svr nil ) (princ))(defun MeChangeCrosshairColor (Rea Arg / AcaDsp AcaObj LayBco) (if (vl-position (car Arg) '("CVPORT")) (progn (setq AcaObj (vlax-get-acad-object) AcaDsp (vla-get-Display (vla-get-Preferences AcaObj)) LayBco (vlax-variant-value (vlax-variant-change-type (vla-get-GraphicsWinLayoutBackgrndColor AcaDsp) vlax-vbLong ) ) ) ; ; Color list: ; 0 = Black ; 255 = Red ; 65535 = Yellow ; 65280 = Green ; 16776960 = Cyan ; 16711680 = Blue ; 16711935 = Magenta ; 16777215 = White ; Set the cursor color to the appropriate value: ; (vla-put-LayoutCrosshairColor AcaDsp (if (= (getvar "CVPORT") 1) 255 ;Cursor color in Paperspace (MeInvGreyCol LayBco) ) ) ) ) (princ))(defun MeInvGreyCol (Col) (boole 6 (* (* (/ (/ (+ (logand Col 255) (logand (/ Col 256) 255) (logand (/ Col 65536) 255)) 3 ) 128 ) 255 ) 65793 ) 16777215 ))(princ)
Who did that?