새로운 xdata 목록을 아래와 같이 저장을 하고
(setq xdataList_Ln (list -3 (list $Lineno
(cons 1002 “{“)
(cons 1000 (strcat Lninfo01_write Lninfo02_write))
(cons 1002 “}”)
)));<setq>
객체에서 (setq xdataList (assoc -3 entList)) 으로 xdata를 저장한 후에 xdata 유무에 따라서 아래와 같이 xdata를 entList에서 추가하거나 수정하게끔 했는데요… 없을때는 append로 추가하면 잘되는데 있을때 기존 xdata를 새로운 xdata로 대체할려고 subst로 대체했는데 appname($Lineno)부분이 똑같으면 잘되는거 같은데 다를때는 대체가 되지 않고 추가가 되는데 기존 entList 에서 (assoc -3 entList) 이 값을 xdataList_Ln 로 대체하는 방법이 틀린건가요? 아니면 xdata에서는 appname가 다르면 subst를 사용하더라도 대체가 안되고 추가가 되는건가요?
(if xdataList
(setq entList (subst xdataList_Ln (assoc -3 entList) entList))
(setq entList (append entList (list xdataList_Ln)))
);<if>
(entmod entList)
xdata 있을때 subst로 새로운 xdata를 대체한후 entList의 값
((-1 . <도면요소 이름: 7d4248d0>) (0 . “LWPOLYLINE”) (330 .
<도면요소 이름: 7ef87cf8>) (5 . “8D52”) (100 . “AcDbEntity”) (67 . 0) (410 .
“Model”) (8 . “SB008”) (100 . “AcDbPolyline”) (90 . 2) (70 . 0) (43 . 0.3) (38
. 0.0) (39 . 0.0) (10 1816.87 1135.02) (40 . 0.3) (41 . 0.3) (42 . 0.0) (10
1783.94 1119.52) (40 . 0.3) (41 . 0.3) (42 . 0.0) (210 0.0 0.0 1.0) (-3
(“2000-050” (1002 . “{“) (1000 . “2012/HP/%%C200/L36.40/D97.85/D97.80/S1.37”)
(1002 . “}”)) (“2000-099” (1002 . “{“) (1000 .
“2012/HP/%%C200/L36.40/D97.85/D97.80/S1.37”) (1002 . “}”))))
express “xdlist” 명령으로 출력했을때
Enter application name <*>:
* Registered Application Name: 2000-050
* Code 1002, Starting or ending brace: {
* Code 1000, ASCII string: 2012/HP/%%C200/L36.40/D97.85/D97.80/S1.37
* Code 1002, Starting or ending brace: }
* Registered Application Name: 2000-099
* Code 1002, Starting or ending brace: {
* Code 1000, ASCII string: 2012/HP/%%C200/L36.40/D97.85/D97.80/S1.37
* Code 1002, Starting or ending brace: }
Object has 16283 bytes of Xdata space available.
위 값에서 기존 “2000-050″의 값이 “2000-099″의 값으로 대체되어야 하는데 추가되는 형식으로 entList가 바뀌네욤 ㅠㅠ