←  nanoCAD forum

nanoCAD forum

»

Capital letters of filename change to smal...

Robse Ponte's Photo Robse Ponte 17 Aug 2020

Hello,

I want to know if there is a possibility to change the behavior of the filename in NanoCAD.

I attached a screenshot where you can see the explorer of windows with a highlighted Dwg and its filename with capital letters. When i open it in NanoCAD everything in the filename is written in small letters. This is very annoying because i need to save as the file all the time and overwrite it instead of just saving it.

Is there any setting to change it?

Thank you and best regards
Quote

pguimber's Photo pguimber 17 Aug 2020

Hello,
in settings i don't see !
Maybe with a script LISP ...

See :
https://stackoverflo...ase-insensitive

https://stackoverflo...tring-uppercase
(setq a 'ljlkj)
(upper-case-p (char (string a) 0)) ----> returns T (and I want nil)
Quote

Robse Ponte's Photo Robse Ponte 17 Aug 2020

Hello and thank you for your answer.

I am just a standard user with limited programming knowledge (c++ but no lisp) . I red and tried to understand but i didn´t get it.

Could you explain it a bit better what you think it has to be done?

Do i need to open it with a lisp, or save it via lisp? Could you give me some more input what needs to be done. i am sorry, I don´t want you to provide a solution. i would love to learn a bit lisp. But it´s my lack of experience, that prevents me to know how to start.

Best regards
Quote

pguimber's Photo pguimber 18 Aug 2020

Hello,
I'm not a programmer but I think a script in LISP or VBA or JAVA, NC5.0 takes all three, can do this job:
Save the file using uppercase characters for the name...

In LISP the notion of uppercase characters is supported even if internally the interpreter does not distinguish them.
https://www.gnu.org/...Conversion.html
For example this script save and export the lengths of the selected polylines to a .csv file.
Spoiler


In VBA for example :
https://docs.microso.../ucase-function
Dim LowerCase, UpperCase
LowerCase = "Hello World 1234" ' String to convert.
UpperCase = UCase(LowerCase) ' Returns "HELLO WORLD 1234".


JAVA, I don't know but I suppose it !

So we must be able to save the drawing with uppercase characters or create a small program that renames all the files in a folder ....
Quote

Robse Ponte's Photo Robse Ponte 24 Aug 2020

Hello,

Thank you for your help. It works so far, but i have a second Issue now. I have a Filename like this: 742_151_102_A-Ground_73_H117_2_R and Nanocad opens it as 742_151_102_A-ground_73_h117_2_r. How do I get back the original Filename here without making all letters to capital letters?

I figured it out that it is just the automatic opening process that makes the problem. If I open the file within File->Open the name remains good. If i open it with doubleclicking the file name it is wrong. Is it not redicoulus to change the filename afterwards? Also If I make a SaveAs it keeps the filename and i can save it like a common file. I think this is just a bug. Nanocad should open the file right with a doubleclick on the file, or what do you think?
Quote

pguimber's Photo pguimber 24 Aug 2020

Hello,
"Nanocad should open the file right with a doubleclick on the file, or what do you think? "

No ! I've always seen that double clicking to open files causes "little problems".
It is preferable, for the stability of the reactions, to go through the software (whatever it is) to open and close a file.
We are thus "framed" in the software and preserved from system inconsistencies. Windows does not really handle characters like a Linux-style Unix system which handles the case of characters in its kernel !
Quote