anandhan Posted March 26, 2015 Share Posted March 26, 2015 (edited) (defun c:test () (setq obj (entsel "please select the dimension:-")) (setq ab (fix(getreal "please enter the value to change:-" ))) (command "dim1" "new" ab obj "") (princ) ) hi friends if i try to fix value more than 32600 it will fixed automatically some other value please help me what is the reason for this? Edited March 26, 2015 by anandhan Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 26, 2015 Share Posted March 26, 2015 I was able to change a value all the way up to 32599 with no problem. As soon as I tried 33000 the value changed to -32536. That's weird. You're working in metric units I presume? By the way,you might want to change the spelling of the following words so it reads correctly. dimention --> dimension enther --> enter chang --> change Now that I think on it some more you might also want to change this line Please enter the value to change to... Please enter the new value. The difference is subtle but I think it is more correct. Just a suggestion. Quote Link to comment Share on other sites More sharing options...
anandhan Posted March 26, 2015 Author Share Posted March 26, 2015 Yes same problem I am also facing Quote Link to comment Share on other sites More sharing options...
Tharwat Posted March 26, 2015 Share Posted March 26, 2015 Replace the command "dim1" with this line of codes . (entmod (subst (cons 1 (itoa ab)) (assoc 1 (entget (car obj))) (entget (car obj)))) Quote Link to comment Share on other sites More sharing options...
anandhan Posted March 26, 2015 Author Share Posted March 26, 2015 thank you Tharwat, its working Quote Link to comment Share on other sites More sharing options...
Tharwat Posted March 26, 2015 Share Posted March 26, 2015 thank you Tharwat, its working Happy to know and you're very welcome Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 26, 2015 Share Posted March 26, 2015 Please use CODE TAGS, not HTML TAGS nor QUOTE TAGS as you have used in your OTHER THREAD that you have yet to correct!!!! CODE POSTING GUIDELINES!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 26, 2015 Share Posted March 26, 2015 if i try to fix value more than 32600 it will fixed automatically some other value please help me what is the reason for this? Actually, the limit is 32767 or (2^15)-1 - this is the upper-limit for a signed 16-bit integer; values higher than this will flip the sign bit and will result in values increasing from -32768. This is a remnant from early releases of AutoCAD in which 16-bit signed integers were used as standard (you see the same limit when prompting for an integer using the getint function). Nowadays, integers are represented using 32-bit or even 64-bit signed integers, giving upper-limits of 2,147,483,647 & 9,223,372,036,854,775,807 respectively. 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.