Tharwat Posted September 4, 2011 Posted September 4, 2011 ... oh well Were I mistaken with the steps ? Quote
Lee Mac Posted September 4, 2011 Posted September 4, 2011 I always wondered about that myself bijoyvm. what i usually do is include this code after creation of the block Even with Vanilla AutoLISP, the modification to the Block Insertion Units must be processed after creation of the Block Definition, since the BLOCK_RECORD entity doesn't exist until the BLOCK entity is created. An example to set the Insertion Units to Inches: (defun c:crb ( ) (if (not (tblsearch "BLOCK" "CRBLK")) (progn (if (not (tblsearch "STYLE" "Gen-Text")) (entmake (list (cons 0 "STYLE") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbTextStyleTableRecord") (cons 2 "Gen-Text") (cons 70 0) (cons 40 2.5) (cons 3 "Arial.ttf") ) ) ) (entmake (list (cons 0 "BLOCK") (cons 8 "0") (cons 370 0) (cons 2 "CRBLK") (cons 70 2) (list 10 0.0 0.0 0.0) ) ) (entmake (list (cons 0 "CIRCLE") (cons 8 "0") (cons 370 0) (list 10 0.0 0.0 0.0) (cons 40 1.25) ) ) (entmake (list (cons 0 "ATTDEF") (cons 8 "0") (cons 370 0) (cons 7 "Gen-Text") (list 10 3.0 0.0 0.0) (list 11 3.0 0.0 0.0) (cons 40 2.5) (cons 1 "00") (cons 3 "Number") (cons 2 "NO") (cons 70 0) (cons 72 0) (cons 74 2) ) ) (entmake (list (cons 0 "ENDBLK") (cons 8 "0") ) ) ( (lambda ( lst ) (regapp "ACAD") (entmod (append (subst (cons 70 1) (assoc 70 lst) lst) (list (list -3 (list "ACAD" (cons 1000 "DesignCenter Data") (cons 1002 "{") (cons 1070 1) (cons 1070 1) (cons 1002 "}") ) ) ) ) ) ) (entget (cdr (assoc 330 (entget (tblobjname "BLOCK" "CRBLK"))))) ) ) ) (princ) ) Quote
pBe Posted September 5, 2011 Posted September 5, 2011 Even with Vanilla AutoLISP, the modification to the Block Insertion Units must be processed after creation of the Block Definition, since the BLOCK_RECORD entity doesn't exist until the BLOCK entity is created. Super Thanks Lee BTW: How'd you come up with this: (regapp "ACAD") (entmod (append (subst (cons 70 1) (assoc 70 lst) lst) (list (list -3 (list "ACAD" (cons 1000 "DesignCenter Data") (cons 1002 "{") (cons 1070 1) (cons 1070 1) (cons 1002 "}") ) ) ) ) ) Reverse engineering? Quote
Lee Mac Posted September 5, 2011 Posted September 5, 2011 Super Thanks Lee Thanks pBe BTW: How'd you come up with this: Reverse engineering? Not quite, I used this Quote
pBe Posted September 5, 2011 Posted September 5, 2011 Not quite, I used this Cool beans. Thnaks Lee Quote
mustafa27 Posted September 10, 2011 Posted September 10, 2011 i tired to fix the problem,highlight 1 is working but when i open any cad file highlight will change automatically to "0", and another problem fill 1 is working but when open any cad new fill it go fill "0", when i will try to move the line it go wrong direction, i really upset and last 2 weaks i can't work my project, please kindly i request please send any solution to this problem. Quote
bijoyvm Posted September 12, 2011 Author Posted September 12, 2011 hi lee, How can I make this one an "Annotative" Block? bijoy Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.