TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on November 04, 2004, 12:05:35 PM

Title: Dimstyle LIST
Post by: Andrea on November 04, 2004, 12:05:35 PM
Hi all...

I'm trying to get a list of DIMSTYLE available in the current drawing..
in LISP.

any idea ?

thanks
Title: Dimstyle LIST
Post by: Andrea on November 04, 2004, 12:09:48 PM
ok...sorry I found the solution....

(setq dimstyle_list (ai_table "dimstyle" 4))

but it will be interested to have any other idea..;-)

thanks :wink:
Title: Dimstyle LIST
Post by: Mark on November 04, 2004, 12:11:04 PM
Have a look at tblnext and tblsearch
Title: Dimstyle LIST
Post by: ML on November 04, 2004, 06:39:48 PM
Do it with VBA and you can't go wrong   :D
Title: Dimstyle LIST
Post by: CAB on November 04, 2004, 06:52:18 PM
Ran across this today:
Code: [Select]
(defun getdims
               (/ dim ;dimstyle
                dimcol ;dimension collection
                dwg ;current drawing
                return ;list to be returned
)
  (vl-load-com)
  (setq dwg    (vla-get-activedocument (vlax-get-acad-object))
        dimcol (vla-get-dimstyles dwg)
        return ()
  )
  (vlax-for dim dimcol
    (setq return (append return (list (vla-get-name dim))))
  )
  return
)
Title: Dimstyle LIST
Post by: MikePerry on November 05, 2004, 05:18:23 AM
Quote from: CAB
Ran across this today

Hi

CAB I really think the person who wrote that should be credited, it's only polite and proper to do so when the person is known (in my humble opinion) -

Code written by Michael K. Sretenovic, original can be found here -

http://forums.augi.com/showthread.php?p=60269#post60269

Have a good one, Mike
Title: Dimstyle LIST
Post by: CAB on November 05, 2004, 07:55:18 AM
Please forgive my lazy behavior. I had no intention of slighting the person
whose post I copied. As that person did not put his or her name in the header of
the code nor claimed to be the original author. I just copied the code to my
library 'As Is'. I did not ask who the original author was and did not record
the source or the code. I thought that if the author wanted there name
associated with the code they would add it to the header of the code, I do. I
did remember where I got it as it was the same day that I copied the code but
was too lazy to go back and get the link. My apologies if I offended you or the
author. I NEVER remove the authors information and I did not intend to take any
credit for creating the code. Your comments will no doubt make me more aware
in the future.

Thanks

CAB
Title: Dimstyle LIST
Post by: MikePerry on November 05, 2004, 07:59:51 AM
Hi CAB

No foul / harm and I honestly know you weren't trying to pass-off as your own, I just believe it's best to quote original source if possible....

Cheers, Mike
Title: Dimstyle LIST
Post by: CAB on November 05, 2004, 08:16:04 AM
Thanks Mike
I'll will try to be a better Librarian in the future.
I do collect a lot of code and code snipits but I don't do a good job of organizing them.