Author Topic: Search for specific MLeader and Acad Table in a drawing  (Read 1616 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Search for specific MLeader and Acad Table in a drawing
« on: November 06, 2013, 07:49:18 AM »
Hello guys .

How can I search for a specific Mleader style and Acad Table in a drawing ?

Many thanks  :-)

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: Search for specific MLeader and Acad Table in a drawing
« Reply #1 on: November 06, 2013, 08:06:09 AM »
As predicate functions:

MLeader Style:
Code - Auto/Visual Lisp: [Select]
  1. (defun mleaderstyle-p ( sty / dic )
  2.     (and (setq dic (dictsearch (namedobjdict) "acad_mleaderstyle"))
  3.          (dictsearch (cdr (assoc -1 dic)) sty)
  4.     )
  5. )
Code - Auto/Visual Lisp: [Select]
  1. _$ (mleaderstyle-p "MyStyle")
  2. nil
  3. _$ (mleaderstyle-p "Standard")
  4. T

Table Style:
Code - Auto/Visual Lisp: [Select]
  1. (defun tablestyle-p ( sty / dic )
  2.     (and (setq dic (dictsearch (namedobjdict) "acad_tablestyle"))
  3.          (dictsearch (cdr (assoc -1 dic)) sty)
  4.     )
  5. )
Code - Auto/Visual Lisp: [Select]
  1. _$ (tablestyle-p "MyStyle")
  2. nil
  3. _$ (tablestyle-p "Standard")
  4. T

Coder

  • Swamp Rat
  • Posts: 827
Re: Search for specific MLeader and Acad Table in a drawing
« Reply #2 on: November 06, 2013, 08:14:47 AM »
Fantastic 

I have seen the first post of yours in this thread and this updated one looks also greater :wink:

Many many thanks .

Coder

  • Swamp Rat
  • Posts: 827
Re: Search for specific MLeader and Acad Table in a drawing
« Reply #3 on: November 07, 2013, 03:36:12 AM »
One more thing please  :oops:

I need to put them on ( current ) , is that possible sir ?

Many thanks

EDIT >>> I found the system variable for MLeader .

Code: [Select]
(setvar 'cmleaderstyle "Style name")

Just still in need of Acad Table to put it on . :-)
« Last Edit: November 07, 2013, 06:57:04 AM by Coder »

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: Search for specific MLeader and Acad Table in a drawing
« Reply #4 on: November 07, 2013, 08:43:15 AM »
Code: [Select]
(setvar 'ctablestyle "Table Style")
:)

Coder

  • Swamp Rat
  • Posts: 827
Re: Search for specific MLeader and Acad Table in a drawing
« Reply #5 on: November 07, 2013, 10:48:09 AM »
That's what I am looking for .

Thanks for your time and nice replies . :-)