Author Topic: Dimstyle LIST  (Read 3362 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Dimstyle LIST
« 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
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Dimstyle LIST
« Reply #1 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:
Keep smile...

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Dimstyle LIST
« Reply #2 on: November 04, 2004, 12:11:04 PM »
Have a look at tblnext and tblsearch
TheSwamp.org  (serving the CAD community since 2003)

ML

  • Guest
Dimstyle LIST
« Reply #3 on: November 04, 2004, 06:39:48 PM »
Do it with VBA and you can't go wrong   :D

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dimstyle LIST
« Reply #4 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
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MikePerry

  • Guest
Dimstyle LIST
« Reply #5 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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dimstyle LIST
« Reply #6 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
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MikePerry

  • Guest
Dimstyle LIST
« Reply #7 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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dimstyle LIST
« Reply #8 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.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.