Display full version of the post: AutoLISP change decimal point to comma

lumpy92
10.08.2017, 23:49
Hi everyone!I am creating a simple command in autoLISP and I have a little problem.At some point, I give a value for a variable,which is a real number (e.g. 0.3) and the program uses it to draw.Later the command create a multiline text object and write there those numbers (now 0.30).In Hungary, we use comma instead of a decimal point and I want my value displayed like this: 0,30.Can I somehow change the point to a comma?Thank you very much!

jkaunisto
12.08.2017, 08:15
Comma separates two numbers and dot is for decimals. If you want to use Lisp, you have to use dot. If you want to just display (and never use that afterwards for any mathematival purposes) you can change the real-number to text and replace the dot with anything you like. (strcat ....

philippe JOSEPH
12.08.2017, 09:34
Hello, if you want to change decimal point to comma on text you can use FIND with various options : on one specific selection or on the entire drawing ( warnning this can be dangerous ).If you want to change decimal point to comma on dimentions you only have to set your dimensions for this.P.S. See Tip 854 right here under.
philippe JOSEPH2017-08-12 09:35:38

lumpy92
14.08.2017, 16:14
Thank you, I managed to solve the problem with substr and strcat.