PDA

View Full Version : Identifying DimStyle <Overrides> with AutoLisp



brianaubert
2004-11-24, 06:03 PM
Is there a way to determine if an existing Dimension Style has <Overrides> associated with it?

So far I've had no luck with the Dimstyle tables.

k1jbrn2
2004-11-24, 11:58 PM
Dimstyle override information is stored as XDATA. Reference the AutoLISP and Visual LISP Documentation Set in the ACAD Help file for further information on XDATA.

The same question was posted in Sept. to the Autodesk Forum (http://discussion.autodesk.com, "Where to find a particular dimstyle override" on 9/16/04 from chrisb). I will make a closer examination of the code as time allows. Hope this helps.

..................................................................................................................................

(entget (car (entsel)) '("acad"))
((-1 . <Entity name: 77757130>)
(0 . "DIMENSION")
(330 . <Entity name: 7c804c98>)
(5 . "27DE")
(100 . "AcDbEntity")
(67 . 1)
(410 . "TS32")
(8 . "S-DIMS")
(100 . "AcDbDimension")
(2 . "*D57")
(10 23.9543 11.8351 0.0)
(11 22.8365 11.9319 0.0)
(12 0.0 0.0 0.0)
(70 . 32)
(1 . "")
(71 . 5)
(72 . 1)
(41 . 1.0)
(42 . 26.8285)
(52 . 0.0)
(53 . 0.0)
(54 . 0.0)
(51 . 0.0)
(210 0.0 0.0 1.0)
(3 . "Atr_12$0")
(100 . "AcDbAlignedDimension")
(13 21.7186 11.1436 0.0)
(14 23.9543 11.1436 0.0)
(15 0.0 0.0 0.0)
(16 0.0 0.0 0.0)
(40 . 0.0)
(50 . 0.0)
(100 . "AcDbRotatedDimension")
(-3 ("ACAD" (1000 . "DSTYLE")
(1002 . "{")
(1070 . 281)
(1070 . 1)
(1002 . "}")
)
)
)

CAB2k
2004-11-25, 01:27 PM
Check it out
http://www.google.com/groups?q=+%22Here%27s+the+description+from+the+ObjectARX+docs%22+group:autodesk.autocad.customization&hl=en&lr=&selm=37B62E2A.D9CFE190%40autodesk.com&rnum=1

CAB2k
2004-11-25, 01:29 PM
And another one:
http://www.google.com/groups?q=+%22Here%27s+some+routines+that+I+wrote+that+may+help+you%22+group:autodesk.autocad.customization&hl=en&lr=&selm=VA.00000282.0794d545%40main&rnum=1

kennet.sjoberg
2004-11-25, 04:11 PM
"Dimoveride" is saved in extended data, DXF group codes type 1001-...
not in normal entity definition data, DXF group codes type 0-...
To find out if extended data exist, You can use this code


(defun c:extdata ( / ExtEntDxf ExtDxf )
(setq ExtEntDxf (entget (car (entsel ))(quote ("ACAD" ))) )
(setq ExtDxf (assoc -3 ExtEntDxf ) )
(if ExtDxf
(progn
(princ "ACAD Extended data exist : \n" )
(princ ExtDxf )
)
(princ "Object do not have ACAD Extended data")
)
(princ)
)


Then to read what's changed, You can use DXF group codes type 0-...

: ) Happy Computing !

kennet