Jump to content

LISP bad SSGET lisp value 'error


ttray33y

Recommended Posts

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 by ttray33y
update for everyones use.!
Link to comment
Share on other sites

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...