Jay Tree Posted January 4, 2018 Share Posted January 4, 2018 Hi, I would like to move the decimal place in the coordinates 3 places to the left to convert from mm to m - e.g divide by 1000 - in the following code, for both X value and Y value. Have tried reading tutorials, but doesn't seem to work. Any help appreciated (e.g. divide the numbers that result from $(rtos,$(index,0,$(getvar,lastpoint)),2,2) in the following): ^C^C_id;\_-mtext;@;_h;$M=$(*,.25,$(getvar,ltscale));@1 Many thanks. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 4, 2018 Share Posted January 4, 2018 (edited) I have moved your thread to the AutoCAD LT Forum. I do not believe AutoCAD LT can use any LISP. Looks like you are working on creating a Button Macro. It also helps to use Code Tags. [NOPARSE] Your Code Here[/NOPARSE] = Your Code Here Edited January 5, 2018 by SLW210 Corrected Information Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 5, 2018 Share Posted January 5, 2018 (edited) Look at this example divide by 10 just add it in sequence. $(/,$(getvar,viewsize),10)) I know I had a run diesel form command line it may be at home or else would test. tested X=$(rtos, $(/,$(getvar,viewsize),1000.0) ,2,2) Run diesel from command line (defun C:DIESEL ( / dsl ) (while (/= dsl "M=") (setq dsl (strcat "M=" (getstring T "\nDIESEL: "))) (princ (menucmd dsl)) ) (princ) ) Edited January 5, 2018 by BIGAL Quote Link to comment Share on other sites More sharing options...
Jay Tree Posted January 9, 2018 Author Share Posted January 9, 2018 Hi, I should have said that I'm pasting this into the macro field when creating a custom command in autocad LT (CUI). It seems to work fine. There is something else I would like to modify about it though: The leader takes the default arrow style and size, is there a way to specify this in the code (I want circle with origin shown and size about 50) or to point it to a custom style within the dimstyles? My directors are not currently sure if they want mms or metres, so lets run with the original code: ^C^C_id;\_-mtext;@;_h;$M=$(*,.25,$(getvar,ltscale));@1 Many thanks. Quote Link to comment Share on other sites More sharing options...
steven-g Posted January 9, 2018 Share Posted January 9, 2018 Unfortunately there is no way to bypass the leader dialogue in LT, and dialogues can't be navigated with a script or macro, there is no commandline alternative. Quote Link to comment Share on other sites More sharing options...
Jay Tree Posted January 9, 2018 Author Share Posted January 9, 2018 Ok, thanks. One more question. In LT on Mac, is there a way to access this custom command from the command line? E.g. like the usual commands PL, RECTANG, DI, etc. Many thanks in advance. Quote Link to comment Share on other sites More sharing options...
steven-g Posted January 9, 2018 Share Posted January 9, 2018 If you mean your new macro, then I doubt it, I don't know anything about LT for MAC except it has quite a bit less functionality than LT, and in the windows LT version you cannot run a macro from the command line. Quote Link to comment Share on other sites More sharing options...
Jay Tree Posted January 11, 2018 Author Share Posted January 11, 2018 Decided to just apply a Mac system keyboard shortcut to the command. Thanks Quote Link to comment Share on other sites More sharing options...
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.