Jump to content

Recommended Posts

Posted

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

Posted

Welcome to CADTutor!

 

If you're successfully employing SUBST function, consider the ENTMOD function. :wink:

Posted
Welcome to CADTutor!

 

If you're successfully employing SUBST function, consider the ENTMOD function. :wink:

Thanks for the linky.
Posted
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

Posted
....... :????

lol

Suddenly felt like posting something completely random. ImageAttachTourettes.

Posted
lol

Suddenly felt like posting something completely random. ImageAttachTourettes.

 

.... Uh, huh

 

disappointment.you'll.know.it.when.you.see.it.jpg

 

:rofl:

Posted

i have to use ENTMOD after i change the association list with SUBST, and, SUBST doesn't work

Posted

'subst' does work; the error is in your coding.

 

Post the section of code that you are having trouble with.

Posted

(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)

)

)

Posted

You're not entmod'ing the subst'ed data.

Try:

  (entmod   (subst New Old D))

Posted (edited)
You're also not using
. ;)

I'm going to start posting code with code tags, [i]just to make SLW210 happy[/i]. :P

Edited by SLW210
Posted
Persiflage removed and statement corrected. :D

Thanks O'Brien.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...