Also removed the '31' from selection choices. " Removing the 1 from the initget allows a null entry. I get syntax errors from your program but there are a couple things in your post that got the program working as I had envisioned. You could also utilise the dynamic prompt and select using the mouse. If you need to expand or change colors, change these lists. This is all controlled by the two lists c_lst a list of colors and k_list a list of strings corresponding to the colors in c_lst.
The following if test for this and sets "str" to the default Removing the 1 from the initget allows a null entry. (vla-put-ModelCrosshairColor disp (nth s_int c_lst)) (setq str (getkword (strcat "\nSelect Cursor Color " " : "))) (initget (vl-string-right-trim " " (apply 'strcat (mapcar '(lambda (x) (strcat x " ")) k_lst)))) (defun C:CC19 (/ disp c_lst k_lst str s_int) It's untested as I'm not at a computer with Autocad. Don't know why, but that's insignificant and can be ignored. * Not really an error, but it also changes the color of the text of the Model Space tab.
#HOW TO CHANGE CURSOR COLOR ON MAC PORTABLE#
You can see I've made a selection entry for it, but is it possible, using the method I have chosen to construct this program, to modify the program so that I can return the cursor color to my default by merely pressing the ENTER or SPACE key to make the default selection? This would make it truly portable and I could share it easily with co-workers who also prefer to use a "custom" cursor color.
#HOW TO CHANGE CURSOR COLOR ON MAC HOW TO#
However, I don't know how to implement my prefered method for returning the cursor color to my default color of 31. The below conversion routines lifted from Lee Mac's excellent web site: ((eq str "1")(vla-put-ModelCrosshairColor disp 255)) 255 = Red (setq disp (vla-get-Display (vla-get-Preferences (vlax-get-acad-object)))) (getkword "\nSelect New Cursor Color : ") I work with a cursor color of 31 and a black background, and every now and then I need to change the color of the cursor for some added clarity, hence this program to try to do it quickly. But I can't make it do something I really wish to implement. I can enter a color number or select it at the command line. This little program to change the cursor color works perfectly and without error*, so long as I select from the list. Been looking at this too long, and it's time to request assistance.