- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a command to toggle off a dimension extension line, based on a users select dim prompt. But the results are varying in that, sometimes it removes the 'ACAD_DIMASSOC_CALC_DIMLFAC' and the 'ACAD_DIMASSOC_DIMLFAC' and replaces the dimension value if it had a linear scale of 1. but, it is inconsistent, so now I'm thinking, I'm missing something fundamentally. Just a note, I thought, if the text had a background text enabled, it would work, but it sometimes does it to those entites as well. Again, I can't see a trend here:
(setq DimEnt (car (entsel)))
(setq oldlist (entget DimEnt))
(if (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_CALC_DIMLFAC")))(setq GetCalcDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_CALC_DIMLFAC"))))))(setq GetCalcDimLFac nil))
(if (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_DIMLFAC")))(setq GetDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_DIMLFAC"))))))(setq GetDimLFac nil))
(if (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_OVERRIDDEN_DIMLFAC")))(setq GetOvrdeDimLFac (car (cdr (assoc -3 (entget DimEnt '("ACAD_DIMASSOC_OVERRIDDEN_DIMLFAC"))))))(setq GetOvrdeDimLFac nil))
(if (assoc -3 (entget DimEnt '("ACAD")))(setq GetAcad (car (cdr (assoc -3 (entget DimEnt '("ACAD"))))))(setq GetAcad nil))
(setq StartOfAcadList '("ACAD" (1000 . "DSTYLE") (1002 . "{") (1070 . 76) (1070 . 0) (1070 . 75) (1070 . 1)))
;(setq EndOfAcadList (member (cons 1070 40) GetAcad))
(setq EndOfAcadList '((1002 . "}")))
(if (member (cons 1070 69) GetAcad)(setq BGMask (list (nth 0 (member (cons 1070 69) GetAcad)) (nth 1 (member (cons 1070 69) GetAcad))))(setq BGMask nil))
(setq FinalAcadList (append StartOfAcadList BGMask EndOfAcadList))
(if (and (= GetCalcDimLFac nil)(= GetDimLFac nil)(= GetOvrdeDimLFac nil))(setq thedata (list (list -3 FinalAcadList)))(setq thedata (list (list -3 GetCalcDimLFac GetDimLFac GetOvrdeDimLFac FinalAcadList))))
(setq newlist (append oldlist thedata))
(entmod newlist)
Any help here would be great.
Solved! Go to Solution.