Results 1 to 2 of 2

Thread: wildcarding tblobjname BLOCK with wcmatch?

  1. #1
    Member
    Join Date
    2005-08
    Posts
    14
    Login to Give a bone
    0

    Default wildcarding tblobjname BLOCK with wcmatch?

    I'm stuck trying to get wildcarding to work with tblobjname BLOCK. after research, it looks like wcmatch needs to be added for wildcarding to work. Can I get example of how to make the code below work.


    Code:
    (if (tblobjname "BLOCK" "ART*")
       (c:afm_delblk_art)
     )
    Thanks,
    Mike
    Last edited by Opie; 2007-12-12 at 06:52 PM. Reason: [CODE] tags added

  2. #2
    Member
    Join Date
    2005-08
    Posts
    14
    Login to Give a bone
    0

    Default Re: wildcarding tblobjname BLOCK with wcmatch?

    Got the info I needed -

    Code:
    ; Jason Piercey . July 24th, 2003
    ; performs a wildcard match between the second
    ; element in dxf code 2 and [entry] for each
    ; entry defined in [table].
    ; [table] - string, table name
    ; [entry] - string, entry name
    ; return - list, list of entity lists
    ; example: (wcTblnext "dimstyle" "stan*")
    (defun wcTblnext (table entry / data rtn)
      (setq table (strcase table))
      (setq entry (strcase entry))
      (while (setq data (tblnext table (null data)))
        (if	(wcmatch (strcase (cdr (assoc 2 data))) entry)
          (setq rtn (cons data rtn))
        )
      )
      (reverse rtn)
    )
    Last edited by Opie; 2007-12-12 at 09:23 PM. Reason: [CODE] tags added

Similar Threads

  1. How to change dynamic block attribute default values based on block selected?
    By zeirz109180 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2013-12-13, 02:20 PM
  2. 2013: Can't find user block in block list while creating a multi-leader style
    By rsturgeon502669 in forum AutoCAD Annotation
    Replies: 1
    Last Post: 2013-07-08, 07:05 AM
  3. Replies: 2
    Last Post: 2012-06-06, 12:28 PM
  4. TBLSEARCH, TBLOBJNAME with ENTMOD
    By jeff.richards in forum AutoLISP
    Replies: 26
    Last Post: 2011-08-25, 11:40 AM
  5. Highlight Last Opened Block in Block Editor Block List
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2008-10-11, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •