Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I have a text, drawing name, within that are at value I need to calculate.
I need to calculate the value, but need to know if there is a minus. I need to know have many
places “substr” need, to get the value, if it is a minus, I need 4 digits if it is positive I only need 3 digits to get the value it out.
22-23910_PL_-0.1__AME_-0.7.dwg
22-23910_PL_0.1__AME_-0.7.dwg
(Setq NEL_PL (substr (getvar "dwgname") 13 1)) ;Getting the value, I this case a minus sign
(setq NEL_PL_N (read NEL_PL)) ;change it to normal sign.
if I compare ( = NEL_PL_N -) I do not get T
If I do the same like this (= - -) I get T
WHY
Regards
Henrik
Solved! Go to Solution.