Some items are in the list returned by (tblsearch ...), some other items
are in the list returned by (entget (tblobjname ...)), and some items
aren't available in any list if they are set to the default value. For
AutoCAD 2000 and 2000i:
(setq TblsearchList (tblsearch "DIMSTYLE" StyleName)
TblobjnameList (entget (tblobjname "DIMSTYLE" StyleName))
DefaultList (list '(79 . 0) ; DIMAZIN
'(148 . 0) ; DIMALTRND
(cons 179 (getvar "DIMADEC")) ; DIMADEC
'(276 . 0) ; DIMFRAC
'(277 . 2) ; DIMLUNIT
'(278 . ".") ; DIMDSEP
'(279 . 0) ; DIMTMOVE
'(289 . 3) ; DIMATFIT
'(341 . "") ; DIMLDRBLK
'(342 . "") ; DIMBLK
'(343 . "") ; DIMBLK1
'(344 . "") ; DIMBLK2
'(371 . -2) ; DIMLWD
'(372 . -2) ; DIMLWE
)
)
Then you search those three lists, in the order in which they were
created, until you find what you want and stop searching.
This also works for AutoCAD 2002 except I'm not positive that it always
returns the correct value of DIMADEC (the handling of which changed in
AutoCAD 2002).
See the download page at http://www.fleming-group.com for a program that
returns a list of all the settings of a dimension style in one list.
jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services
In article <
[email protected]>, Ken
Alexander wrote:
> Sorry Kevin, should have looked at your post better.
> Using tblsearch works. So am I correct in saying that
> defaults aren't listed in the entity lists?
>
> --
> Ken Alexander
> Acad 2000
> Win 2000
> "Kevin Nehls"
wrote in message
> news:[email protected]...
> > I find the 271 info for the dimstyle when I do this:
> >
> > (setq
> > diminfo (tblsearch "DIMSTYLE" "STANDARD")
> > dimprec (cdr (assoc 271 diminfo))
> > )
> >
> > --
> > Kevin Nehls
> >
> >
> > "Ken Alexander" wrote in message
> > news:[email protected]...
> > > If precision is set to 4 (default value) for a dimstyle this routine
> will
> > > return nil, anyother precesion setting and the routine returns the
> dimdec
> > > sys var for that sytle.
> > >
> > > (defun C:test (/ diminfo dimprec)
> > > (setq
> > > diminfo (entget (tblobjname "DIMSTYLE" "STANDARD"))
> > > dimprec (cdr (assoc 271 diminfo))
> > > )
> > > dimprec
> > > )
> > >
> > > --
> > > Ken Alexander
> > > Acad 2000
> > > Win 2000
> > >
> >
> >
>