Code Red > AutoLISP (Vanilla / Visual)
Text insert routine
ELOQUINTET:
CAB,
I am interested in modifying your text insert routine so that by default it uses a specified dimension style not the current and i would like the leader type to be set to 3 point by default. I am looking through the code and need a hint what I would need to modify to aceive this. Can you or anybody else for that matter help me out. Thanks
CAB:
3 point by default, find this line
--- Code: ---(setq useleader 0) ; use a leader with text 0=no
--- End code ---
change 0 to 3
Preset DimStyle, find this
--- Code: --- (setq cur_dim (getvar "dimstyle")
cur_dim_old cur_dim
) ; save curent Dim Style
--- End code ---
Change to this
--- Code: --- (setq cur_dim_old (getvar "dimstyle")
cur_dim <your dim style>
) ; save curent Dim Style
--- End code ---
Let me know if that doesn't work, cause I didn't test it.
ELOQUINTET:
i'll try it tomorrow cab and let you know thanks
ELOQUINTET:
hey cab i found the lines and modified them as suggested but it's not behaving how i want. i see that it switches to 3 point leader when executed no matter what i have specified. this is ok for me as i don't really use the others but for someone who may want to do a 2 point they may just abandon the routine all together. like i say it's a quick fix for me yes but limits the funtionality of the routine. now for the dimstyle part. i'm not sure if i've got the syntax right because it's not working:
--- Code: --- (setq cur_dim (getvar "dimstyle")
cur_dim_old SECT$7
--- End code ---
do i need to put the style in quotes or do i need to do something else. also another thing i was thinking is that we put almost everything on 0 layer and have different colors. the text we have yellow but the routine sets the color to bylayer. is there a way i can make the text be yellow? thanks for everything,
CAB:
You weren't paying attention 8-)
--- Code: --- (setq cur_dim_old (getvar "dimstyle")
cur_dim SECT$7
) ; save curent Dim Style
--- End code ---
Yes, this was just for you but I'll look at the 3 pt leader thing later.
Navigation
[0] Message Index
[#] Next page
Go to full version