guitarguy1685 Posted February 1, 2010 Posted February 1, 2010 hi again again! i have a another question. what if I want to change the DXF values of multiple objects using (ssget). I'm searching for an answer. I have no idea how to do this. thanks in advance! Quote
Lee Mac Posted February 1, 2010 Posted February 1, 2010 You will need to iterate through the set, and change each entity's DXF in turn. Take a look a many of my examples, I do this quite often. I believe I even linked you to an example of such (changing all entities to green). :wink: Lee Quote
guitarguy1685 Posted February 2, 2010 Author Posted February 2, 2010 hmmm i'll have to take a look. Quote
guitarguy1685 Posted February 2, 2010 Author Posted February 2, 2010 well I looked at one of your posts and it does what I want. I just changed some the color and instead of layer I changed linetype. but I just want to make sure I understand this code (defun c:doit (/ i ss ent eLst) (if (setq i -1 [color=Red];i'm guessing this is for the "while" counter[/color] ss (ssget "_:L")) [color=Red];this is the selection set. not sure what kind if selec :L is[/color] (while (setq ent [color=Red];variable for the entity name[/color] (ssname ss (setq i (1+ i)))) [color=Red];this will continue to +1 untill it runs out of object entities[/color] [color=Red];when it runs out it returns nil and stops the loop.[/color] [color=Red];(1+ i) = 0 which is first entity in selection set[/color] (setq eLst (entget ent)) [color=Red] ;retrieve DXF codes[/color] (setq eLst (subst '(8 . "0") (assoc 8 eLst) eLst)) [color=Red];modify DXF[/color] (entmod [color=Red];all of this is incase a DXF code does not exist.[/color] (if (assoc 62 eLst) (subst '(62 . 3) (assoc 62 eLst) eLst) (append eLst '((62 . 3))))))) (princ)) Quote
David Bethel Posted February 2, 2010 Posted February 2, 2010 The groups that need the ( append ) call that I know of are: -3 - XDATA 6 - Linetype 39 - Thickness 48 - LTYPEScale 62 - Color 67 needed it in R12, but not since. They may be a bunch more in newer stuff. -David Quote
Lee Mac Posted February 2, 2010 Posted February 2, 2010 (ssget "_:L") Filter out entities on Locked Layers. 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.