gerardo2m Posted June 10, 2019 Posted June 10, 2019 Hi. I am generating a block using ENTMAKE, but I have noticed that the property "InsUnits (RO)" indicates "Unitless". The variable "INSUNITS of the document (drawing) is set to "6" for Meters, but when generating the Block the property is set as Unitless. How do I assign the property to the BLOCK as this is the INSUNITS variable? (defun ent-block (nameBlock pto-ins atrib-var / ) (entmake (list '(0 . "BLOCK") '(100 . "AcDbEntity") '(100 . "AcDbBlockBegin") '(8 . "0") (cons 2 nameBlock) (cons 10 pto-ins) (cons 70 (if atrib-var 2 0)) ) ) ) (defun makeBlockGMM (listaEntNames nameBlock pto-ins atrib-var / msg ciclo) (defun ciclo ( listaEntNames / X) (foreach X listaEntNames (entmake (entget X)) ) ) (if (vl-catch-all-error-p (setq resultado01 (vl-catch-all-apply 'ent-block (list nameBlock pto-ins atrib-var)))) (progn (prompt (setq msg (strcat "**ERROR en Cabecera, mensage de error: " (vl-catch-all-error-message resultado01)))) ) ) (if (and (not msg ) (vl-catch-all-error-p (setq resultado02 (vl-catch-all-apply 'ciclo (list listaEntNames))))) (progn (prompt (setq msg (strcat "**ERROR en creacion de entidades, mensage de error: " (vl-catch-all-error-message resultado02)))) ) ) (if (and (equal resultado1 nil) (equal resultado2 nil)) (progn (ent-endblock) ) ) ) (defun ent-endblock ( / ) (entmake (list '(0 . "ENDBLK") '(100 . "AcDbEntity") '(100 . "AcDbBlockEnd") '(8 . "0") ) ) ) Regards. Quote
gerardo2m Posted June 11, 2019 Author Posted June 11, 2019 Thanks Lee. Problem solved with your advice. 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.