append and entmod xdata removes other xdata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm able to add a background mask to a dimension entity using the following:
(setq DimEnt (car (entsel)))
(setq OldList (entget DimEnt))
(setq GetCalcDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_CALC_DIMLFAC"))))))
(setq GetDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_DIMLFAC"))))))
(setq GetOvrdeDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_OVERRIDDEN_DIMLFAC"))))))
(setq GetAcad (car (cdr (assoc -3 (entget DimEnt '("ACAD"))))))
(setq StartOfAcadList '("ACAD" (1000 . "DSTYLE") (1002 . "{") (1070 . 69) (1070 . 1)))
(setq EndOfAcadList (member (cons 1070 40) GetAcad))
(setq FinalAcadList (append StartOfAcadList EndOfAcadList))
(setq TheData (list (list -3 GetCalcDimLFac GetDimLFac GetOvrdeDimLFac FinalAcadList)))
(setq NewList (append OldList TheData))
(entmod NewList)
I'm able to turn the first extension line of the dimension off with the following:
(setq DimEnt (car (entsel)))
(setq oldlist (entget DimEnt))
(setq GetCalcDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_CALC_DIMLFAC"))))))
(setq GetDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_DIMLFAC"))))))
(setq GetOvrdeDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_OVERRIDDEN_DIMLFAC"))))))
(setq GetAcad (car (cdr (assoc -3 (entget DimEnt '("ACAD"))))))
(setq StartOfAcadList '("ACAD" (1000 . "DSTYLE") (1002 . "{") (1070 . 76) (1070 . 0) (1070 . 75) (1070 . 1)))
(setq EndOfAcadList (member (cons 1070 40) GetAcad))
(setq FinalAcadList (append StartOfAcadList EndOfAcadList))
(setq thedata (list (list -3 GetCalcDimLFac GetDimLFac GetOvrdeDimLFac FinalAcadList)))
(setq newlist (append oldlist thedata))
(entmod newlist)
Now, consider this workflow:
If I add the background mask, then turn off the extension line, it gets rid of the background mask.
If I turn off the extension line, then add the background mask, it turns on the extension line.
If I add the background mask, tweak the position in the dimension with a grip, then turn off the extension line, the background mask stays applied.
If I turn off the extension line, tweak the position in the dimension with a grip, then add the background mask, the extension line stays off.
Isn't this so weird? Can anyone think of any solutions?