Modify attribute with a multiline text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would have thought that this might work:
(setq ent (cdr (assoc -2 (tblsearch "block" "EP201-L"))))
(while ent
(setq entdata (entget ent))
(and (and (= (cdr (assoc 0 entdata)) "ATTDEF")
(= (cdr (assoc 2 entdata)) "TAIL")
)
(entmod (subst (cons 1 "\\W0.7500;Whatever I\\want to put in") (assoc 1 entdata) entdata))
)
(setq ent (entnext ent))
)
the entity data of the item looks like this, also attached a drawing with the "insert"
(
(-1 . <Entity name: 7ff42c938ca0>)
(0 . "INSERT")
(330 . <Entity name: 7ff42c903f10>)
(5 . "457A")
(100 . "AcDbEntity")
(67 . 1)
(410 . "SHT 01")
(8 . "0")
(100 . "AcDbBlockReference")
(66 . 1)
(2 . "EP201-L")
(10 2.82242 6.12149 0.0)
(41 . 1.0)
(42 . 1.0)
(43 . 1.0)
(50 . 0.0)
(70 . 0)
(71 . 0)
(44 . 0.0)
(45 . 0.0)
(210 0.0 0.0 1.0)
)
(
(-1 . <Entity name: 7ff42c938cb0>)
(0 . "ATTRIB")
(330 . <Entity name: 7ff42c938ca0>)
(5 . "457B")
(100 . "AcDbEntity")
(67 . 1)
(410 . "SHT 01")
(8 . "0_WELD")
(100 . "AcDbText")
(10 2.35144 5.94961 0.0)
(40 . 0.09375)
(1 . "5")
(50 . 0.0)
(41 . 0.75)
(51 . 0.0)
(7 . "Romans")
(71 . 0)
(72 . 1)
(11 2.38492 5.99649 0.0)
(210 0.0 0.0 1.0)
(100 . "AcDbAttribute")
(280 . 0)
(2 . "GAPDISTANCE")
(70 . 0)
(73 . 0)
(74 . 2)
(280 . 0)
)
(
(-1 . <Entity name: 7ff42c938cc0>)
(0 . "ATTRIB")
(5 . "457C")
(102 . "{ACAD_XDICTIONARY")
(360 . <Entity name: 7ff42c938cd0>)
(102 . "}")
(330 . <Entity name: 7ff42c938ca0>)
(100 . "AcDbEntity")
(67 . 1)
(410 . "SHT 01")
(8 . "0_WELD")
(100 . "AcDbText")
(10 1.81461 6.07461 0.0)
(40 . 0.09375)
(1 . "")
(50 . 0.0)
(41 . 0.75)
(51 . 0.0)
(7 . "Romans")
(71 . 0)
(72 . 2)
(11 1.81461 6.12149 0.0)
(210 0.0 0.0 1.0)
(100 . "AcDbAttribute")
(280 . 0)
(2 . "TAIL")
(70 . 0)
(73 . 0)
(74 . 2)
(280 . 0)
(71 . 2)
(72 . 0)
(11 1.81461 6.12149 0.0)
(101 . "Embedded Object")
(10 1.81461 6.12149 0.0)
(40 . 0.09375)
(41 . 0.0)
(46 . 0.0)
(71 . 6)
(72 . 5)
(1 . "\\W0.7500;TYP\\PEP-201"); this is what I want modified.
(7 . "Romans")
(210 0.0 0.0 1.0)
(11 1.0 0.0 0.0)
(42 . 0.378348)
(43 . 0.25)
(50 . 0.0)
(73 . 1)
(44 . 1.0)
(-3
(
"AcadAnnotative"
(1000 . "AnnotativeData")
(1002 . "{")
(1070 . 1)
(1070 . 1)
(1002 . "}")
)
)