Message 1 of 5
Insert Block with Mleader containing attributes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I'm trying to insert with this code a block with an mleader with attributes. But it doesn't work.
Why??????? See the attachments please.
With the block it works, with the mleaderblock it doesn´t.
(vl-load-com) (defun c:<Test3 ( / *error* oATTREQ oATTDIA LM:vl-setattributevalue en-blk1 pos. 83cm) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break")) (princ (strcat "\nError: " errmsg))) (setvar 'ATTREQ oATTREQ) (setvar 'ATTDIA oATTDIA) (princ)) (defun LM:vl-setattributevalue ( blk tag val ) (setq tag (strcase tag)) (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (progn (vla-put-textstring att val) val))) (vlax-invoke blk 'getattributes))) (setq oATTREQ (getvar 'ATTREQ) oATTDIA (getvar 'ATTDIA)) (setvar 'ATTREQ 0) (setvar 'ATTDIA 0) (if (and (not (command "_.INSERT" "SPI-Comax_T83" "_s" 1 "_r" 0)) (not (command PAUSE)) (setq en-blk1 (entlast)) (setq pos. (getstring T "\nPosition: ")) (setq 83cm (getstring T "\nAnzahl 83cm: ")) ) (progn (LM:vl-setattributevalue (vlax-ename->vla-object en-blk1) "pos." pos.) (LM:vl-setattributevalue (vlax-ename->vla-object en-blk1) "83cm" 83cm) )) (setvar 'ATTREQ oATTREQ) (setvar 'ATTDIA oATTDIA) (prin1) ) ; end of defun
Please help...