KarolR Posted January 18, 2012 Posted January 18, 2012 i am a little novice to autolisp. I am trying to write a routine that changes the precision of selected dimensions to 0. i have succeeded in changing the dotted pair of the number measured, and try to substitute that pair with the original one using the subst function. nothing happens, and there is no error message. Have any clues? Thanks-Karol Quote
BlackBox Posted January 18, 2012 Posted January 18, 2012 Welcome to CADTutor! If you're successfully employing SUBST function, consider the ENTMOD function. :wink: Quote
alanjt Posted January 18, 2012 Posted January 18, 2012 Welcome to CADTutor! If you're successfully employing SUBST function, consider the ENTMOD function. :wink: Thanks for the linky. Quote
BlackBox Posted January 18, 2012 Posted January 18, 2012 Thanks for the linky. Anytime, dood. :wink: I'm just bummed that they no longer include the ActiveX Reference (at least, I've not found it online) - Made a backup of acad_dev172.chm to copy forward into newer installs. LoL Quote
alanjt Posted January 18, 2012 Posted January 18, 2012 Anytime, dood. :wink: I'm just bummed that they no longer include the ActiveX Reference (at least, I've not found it online) - Made a backup of acad_dev172.chm to copy forward into newer installs. LoL Yeah, I still have this in my quick bookmarks: http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WSfacf1429558a55de185c428100849a0ab7-5f35.htm Quote
alanjt Posted January 18, 2012 Posted January 18, 2012 ....... ??? lol Suddenly felt like posting something completely random. ImageAttachTourettes. Quote
BlackBox Posted January 18, 2012 Posted January 18, 2012 lolSuddenly felt like posting something completely random. ImageAttachTourettes. .... Uh, huh Quote
KarolR Posted January 19, 2012 Author Posted January 19, 2012 i have to use ENTMOD after i change the association list with SUBST, and, SUBST doesn't work Quote
Lee Mac Posted January 19, 2012 Posted January 19, 2012 'subst' does work; the error is in your coding. Post the section of code that you are having trouble with. Quote
KarolR Posted January 19, 2012 Author Posted January 19, 2012 (defun C:TR ( / A B D NewValue OldValue Old New) (setq A (ssget) B (sslength A)) (while (> B 0) (setq B (B-1)) (setq D (entget (ssname A B))) (setq Old (assoc '42 D)) (setq OldValue (cdr (assoc '42 D))) (setq NewValue (fix OldValue)) (setq New (cons '42 50)) (subst New Old D) (entmod D) ) ) Quote
alanjt Posted January 19, 2012 Posted January 19, 2012 You're not entmod'ing the subst'ed data. Try: (entmod (subst New Old D)) Quote
alanjt Posted January 19, 2012 Posted January 19, 2012 (edited) You're also not using . I'm going to start posting code with code tags, [i]just to make SLW210 happy[/i]. Edited January 19, 2012 by SLW210 Quote
SLW210 Posted January 19, 2012 Posted January 19, 2012 Persiflage removed and statement corrected. Quote
alanjt Posted January 19, 2012 Posted January 19, 2012 Persiflage removed and statement corrected. Thanks O'Brien. Quote
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.