Zorg Posted July 24, 2009 Posted July 24, 2009 Hey Guys, Im still very limited to what i can do with lisp; recently i've been experimenting with shorting command lengths. I thought i'd make on for the tcase function but you have to click to specify what case you want to make the selected text. Is there a varible for each one of them? (UPPER, lower, Sentance, Title.. ect) Thanks in advance Quote
Lee Mac Posted July 24, 2009 Posted July 24, 2009 Take a look at the tcase.lsp in the Express folder. The mode is stored as a variable, and can be retrieved using: (acet-getvar '("ACET-TCASE-MODE")) Quote
Zorg Posted July 24, 2009 Author Posted July 24, 2009 couldn't get this to work for upper case, I'm obviously well out of my league (defun c:tc ( / lst ) (defun acet-tcase-ui-cmd ( / ans def lst ) (setq def (acet-getvar '("ACET-TCASE-MODE"))) (if (not def) (setq def "Upper") );if (initget "Sentence Lower Upper Title toGgle") (setq ans (getkword (acet-str-format "\nSelect case [sentence/Lower/Upper/Title/toGgle] <%1>: " def ) );getkword );setq (if (not ans) (setq ans def) );if (acet-setvar (list "ACET-TCASE-MODE" ans 3)) ;; store it in the drawing and in the profile (list ans) );defun acet-tcase-ui-cmd (princ / ) Quote
Lee Mac Posted July 24, 2009 Posted July 24, 2009 How are you trying to shorten it - at the moment I thought it is just a dialog and a selection - I don't see where it could be shortened, unless you created a function for each setting in the dialog Lee Quote
alanjt Posted July 24, 2009 Posted July 24, 2009 tcase has a commandline version of what you are working towards: Quote
Zakwaan Posted June 5 Posted June 5 (edited) Hi All, Reviving an old thread Any reason why this stopped working in AutoCAD 2025? Worked in 2024 and prior. (acet-getvar '("ACET-TCASE-MODE")) Get the following error: ; error: no function definition: ACET-AUTOLOAD2 Edited June 5 by Zakwaan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.