ttray33y Posted November 20, 2014 Share Posted November 20, 2014 (edited) The routine below is working while only selecting only the block "INSERT" but once a add the DXF code, see red bold below. any idea guys, i am totally lost. i am trying to select arrows with ScaleX -1 T.I.A. (defun C:[color=lime][u][i][b]YOUCOMMAND[/b][/i][/u][/color](/ aaaa bbbb cc cclist pt lay scfr scto) (defun FilterBlkNameX(bbbb valu) (setq aaaa 0 newSet(ssadd)) (while(< aaaa (sslength bbbb)) (setq cc(ssname bbbb aaaa)) (setq cclist(entget cc)) (if(= "INSERT" (cdr(assoc 0 cclist))) (progn (if(= (strcase valu)(strcase (cdr(assoc 2 cclist)))) (ssadd cc newSet) ) ) ) (setq aaaa(+ aaaa 1)) ) newSet ) (setvar "cmdecho" 0) (setq bbbb(ssget "X" (list(cons 0 "INSERT[color=black]")(cons 41 -1.0))))[/color] (if(and bbbb(> (sslength bbbb) 0))(setq bbbb(FilterBlkNameX bbbb "[u][i][b][color=lime]BLOCKNAME[/color][/b][/i][/u]"))) (if (and bbbb (> (sslength bbbb) 0)) [color=cyan] [b](progn[/b][/color] [b][color=cyan] (setq lay "0")[/color][/b] [b][color=cyan] (command "change" bbbb "" "Properties" "LAyer" lay "")[/color][/b] [b][color=cyan] (setq scfr(list 0.000000 0.000000 0.000000))[/color][/b] [b][color=cyan] (setq scto 0.500000)[/color][/b] [b][color=cyan] (command "SCALE" bbbb "" scfr scto)[/color][/b] [b][color=cyan] )[/color][/b] [b][color=cyan] )[/color][/b] (setvar "cmdecho" 1) (princ) ) (princ "\n [u][i][b][color=lime]YOURCOMMAND[/color][/b][/i][/u] to run the program.") (princ) routine updated for everyone Edited November 20, 2014 by ttray33y update for everyones use.! Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted November 20, 2014 Share Posted November 20, 2014 (cons 41 -1.0) have a look at dxf group here :40-48 Quote Link to comment Share on other sites More sharing options...
ttray33y Posted November 20, 2014 Author Share Posted November 20, 2014 have a look at dxf group here :40-48 got it.. many thanks buddy. so i dont need to include double quotes. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted November 20, 2014 Share Posted November 20, 2014 got it.. many thanks buddy. so i dont need to include double quotes. you are welcome. keep practicing & good luck 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.