0 Members and 1 Guest are viewing this topic.
How about something like this?Code - Auto/Visual Lisp: [Select](setq a (car (entsel))) ; Select object(redraw a 3) ; Highlight object(getstring "\nPress enter to continue: ")(redraw a 4) ; Unhighlight object
Oh, I see.I didn't open the drawing because it was a more recent version of Autocad.I guess if you use a monospace font you could calculate the position of the text.
How about adding: {\\L\\O and } around the text so it renders a line above and below it?Not a full square, but might be a simple way of accentuating text.
I have attached a function I use in a TEXT editor I wrote that draws a rectangle around a portion of a text entity. In my function the text string is the variable gv-text_string and the ename for the text string is in the variable gv-text_ename, both of which are defined in the parent function. The two arguments for draw cursor are the left and right character positions for the portion of the string you want to highlight, zero based.Maybe this can give you a start. You would probably want to change the code so the text string ename is passed to the draw_cursor function as an argument rather than being non-localized and so that the string value is obtained by (vle-entget 1 gv-text_ename).Edit: The attached code uses Bricscad VLE- functions. Bricscad has a support file named vle-extension.lsp in the Bricscad Lisp Developer Support Package (https://boa.bricsys.com/applications/a/?lisp-developer-support-package-(ldsp)-a720-al1176) that can be apploaded to provide VLE functions in non-Bricscad CAD systems, or used as a guide to modify the code I posted.