Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What am I doing wrong? This used to work (in the 90's).
I've added oks to focus on which statement had failed, but it makes it all the way through without succeeding.
Ignore the pipe symbol "|" that prefixes symbol names. This started in the days when locals weren't local at all, so I had to identify them to set them to nil.
;;----------------------------------------------------------------
;; This function creates the "SPOT" block definition, and
;; the text style "SIMPLEX" used by the block's "ELEV" attribute:
;; (09-23-03) changed "ELEV" attribute to layer "0" and "BYBLOCK"
;; at request of LGA
;; Also changed justification to "ML"
;;
(defun @Anonymous_def ( / |style)
(if (setq |style (tblsearch "STYLE" "SIMPLEX"))
(if (or
(/= (strcase (cdr (assoc 3 |style))) "SIMPLEX")
(/= (cdr (assoc 40 |style)) 0.0) ; fixed height
(/= (cdr (assoc 41 |style)) 1.0) ; width factor
(/= (cdr (assoc 50 |style)) 0.0) ; obliquing angle
(= (logand (cdr (assoc 70 |style)) 4) 4) ; flag
(/= (cdr (assoc 71 |style)) 0)) ; generation flags
(command "_.style" "SIMPLEX" "simplex" 0.0 1.0 0.0 "_N" "_N" "_N")
)
(command "_.style" "SIMPLEX" "simplex" 0.0 1.0 0.0 "_N" "_N" "_N")
)
(setq ok 99)
(entmake)
(setq ok 100)
(entmake
'((0 . "BLOCK") (2 . "SPOT") (70 . 2) (10 0.0 0.0 0.0))
)
(setq ok 101)
(entmake
'((0 . "TEXT") (8 . "0") (10 0.0 0.0 0.0) (210 0.0 0.0 1.0) (1 . "+") (40 . 0.0833333333) (50 . 0.785398)(62 . 0)
(71 . 0) (72 . 4) (73 . 0)) ;; Middle
)
(setq ok 102)
(entmake
'((0 . "ATTDEF") (8 . "0") ;(100 . "AcDbEntity") (100 . "AcDbText")
(10 0.12 0.0 0.0) (11 0.12 0.0 0.0) ;(100 . "AcDbAttribute")
(40 . 0.0833333) (1 . "") (3 . "Elev") (2 . "ELEV")
(73 . 0) (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "SIMPLEX")
(62 . 0)(71 . 0) (72 . 4) (210 0.0 0.0 1.0) (73 . 0)) ;; Middle, NOT Middle Center
)
(setq ok 103)
(entmake '((0 . "ENDBLK")))
)
John F. Uhden
Solved! Go to Solution.