Hi, I wrote some code to add a leader to the drawing and instead of text, to add a block to the tail of the leader, all std acad stuff. I want the leader to be color 'cyan' and the block to be color 'bylayer'. At first, the code below 'seems' to fail because the leader displays in color 'bylayer', but when i look at the leader's properties, the color is in fact set to 'cyan'. Why does this entity display a different color than what is set? Am i missing something in the code? Can someone help me debug? Also, any other comments/suggestions about the snippet of code are welcome. Thanks in advance for all help and suggestions. (IF ldr (PROGN ; draw a leader (SETVAR "CECOLOR" "CYAN") ; set color for leader to cyan (IF (> (CAR ldr1) (CAR ldr2)) ;; shift left (SETQ insPt (LIST (- (CAR ldr2) offL) (CADR ldr2))) ;; shift right (SETQ insPt (LIST (+ (CAR ldr2) offR) (CADR ldr2))) ) (COMMAND "._LEADER" ldr1 ldr2 "" "" "BLOCK" blck "SCALE" sca insPt 0) ;; change color for tag block to bylayer (COMMAND "CHPROP" "L" "" "COLOR" "BYLAYER" "") ) (PROGN ; insert block without leader (COMMAND "._INSERT" blck "SCALE" sca ldr2 0) ) )
Your dimension style's dimension line color is set to bylayer. If it is byblock you will get the results you desire.
Thanks Jeff, That was the problem. As you can see in my code, i was setting CECOLOR. How do i change the dim line color to 'bylayer'? If there is a sysvar, what is it? Thanks again for your help and speedy response. Sal