Costinbos77 Posted October 16, 2020 Posted October 16, 2020 (edited) Hi , using the next code : ; bML = name of a Block with 1 Attribute (setq bML "CircleML" p '(0 0 0) h 0.2 r 1 txS "Standard") (entMake (list '(0 . "BLOCK") (cons 2 bML) '(70 . 2) '(8 . "0") '(10 0 0 0) '(6 . "ByLayer") '(62 . 256) '(4 . " ML Circle")) ) ; end (entMake (list '(0 . "Circle") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 r) ) ) ; end of e (entMake (list '(0 . "AttDef") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 h) '(1 . "") '(50 . 0) '(41 . 1) '(51 . 0) (cons 7 txS) ' (71 . 0) '(72 . 0) '(11 0 0 0) '(280 . 0) '(3 . "ML-Circle") '(2 . "ML-CIRCLE") '(70 . 0) '(72 . 4) '(73 . 0) '(280 . 1) ) ) ; end of e Middle (entMake '((0 . "EndBlk") (8 . "0")) ) ; end of e (command "_.mLeader" "_H" "_O" "_C" "_B" bML "_X" p (mapcar '1+ p) "attrVal") 1. Why is giving me the next Atrribute Dialog in AutoCAD Map 2021 ? This dialog window seems to appear for the insertion of any Block with Attributes . Was working fine in any other AutoCAD versions (MAP 2011 , 2018) . In AutoCAD 2018 , the dialog is like this : 2. Even the value of the string "attrVal" is not appearing . 3. It is a new variable that is dealing with Attribute dialog ? Regards , Costin Edited October 16, 2020 by Costinbos77 Quote
Costinbos77 Posted October 16, 2020 Author Posted October 16, 2020 (edited) 2 hours ago, ronjonp said: Try setting ATTREQ to 0 ? This is suppressing the dialog window , but after that I can't put any value with lisp because : ; TextJustify = Exception occurred ; TextLeftAttachmentType = 1 ; TextLineSpacingDistance = Exception occurred ; TextLineSpacingFactor = Exception occurred ; TextLineSpacingStyle = Exception occurred ; TextRightAttachmentType = 1 ; TextRotation = Exception occurred ; TextString = Exception occurred ; TextStyleName = Exception occurred ; TextTopAttachmentType = 0 ; TextWidth = Exception occurred (setq ml (vlax-Ename->Vla-Object (entLast)) ) _$ (vla-Put-TextString ml "newVal") ; error: Automation Error. Description was not provided. No matter if AttReq = 0 or 1 ! Edited October 16, 2020 by Costinbos77 Quote
Costinbos77 Posted October 16, 2020 Author Posted October 16, 2020 If someone can run the next cod in AutoCAD MAP eventually 2021 and to leave a feedback, will be great . (setq bML "CircleML" h 0.2 r 1 txS "Standard") (entMake (list '(0 . "BLOCK") (cons 2 bML) '(70 . 2) '(8 . "0") '(10 0 0 0) '(6 . "ByLayer") '(62 . 256) '(4 . " ML Circle")) ) ; end (entMake (list '(0 . "Circle") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 r) ) ) ; end of e (entMake (list '(0 . "AttDef") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 h) '(1 . "") '(50 . 0) '(41 . 1) '(51 . 0) (cons 7 txS) ' (71 . 0) '(72 . 0) '(11 0 0 0) '(280 . 0) '(3 . "ML-Circle") '(2 . "ML-CIRCLE") '(70 . 0) '(72 . 4) '(73 . 0) '(280 . 1) ) ) ; end of e Middle (entMake '((0 . "EndBlk") (8 . "0")) ) ; end of e (setq i 0) (while (setq i (1+ i) ee (getPoint "\n Get Point : < Enter = STOP > : ")) (command "_.mLeader" "_H" "_O" "_C" "_B" bML "_X" ee (mapcar '1+ ee) (itoa i)) ) ; wh In AutoCAD 2018 is running fine , without to ask something . But in AutoCAD MAP 2021 is coming this dialog window with no i value . Does that mean the insert command is different ? Regards , Costin Quote
ronjonp Posted October 16, 2020 Posted October 16, 2020 59 minutes ago, Costinbos77 said: If someone can run the next cod in AutoCAD MAP eventually 2021 and to leave a feedback, will be great . (setq bML "CircleML" h 0.2 r 1 txS "Standard") (entMake (list '(0 . "BLOCK") (cons 2 bML) '(70 . 2) '(8 . "0") '(10 0 0 0) '(6 . "ByLayer") '(62 . 256) '(4 . " ML Circle")) ) ; end (entMake (list '(0 . "Circle") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 r) ) ) ; end of e (entMake (list '(0 . "AttDef") '(8 . "0") '(62 . 256) '(6 . "ByLayer") '(10 0 0 0) (cons 40 h) '(1 . "") '(50 . 0) '(41 . 1) '(51 . 0) (cons 7 txS) ' (71 . 0) '(72 . 0) '(11 0 0 0) '(280 . 0) '(3 . "ML-Circle") '(2 . "ML-CIRCLE") '(70 . 0) '(72 . 4) '(73 . 0) '(280 . 1) ) ) ; end of e Middle (entMake '((0 . "EndBlk") (8 . "0")) ) ; end of e (setq i 0) (while (setq i (1+ i) ee (getPoint "\n Get Point : < Enter = STOP > : ")) (command "_.mLeader" "_H" "_O" "_C" "_B" bML "_X" ee (mapcar '1+ ee) (itoa i)) ) ; wh In AutoCAD 2018 is running fine , without to ask something . But in AutoCAD MAP 2021 is coming this dialog window with no i value . Does that mean the insert command is different ? Regards , Costin Same here in vanilla 2021 Quote
Costinbos77 Posted October 16, 2020 Author Posted October 16, 2020 Thanks ronjonp , that means from AutoCAD 2021 , the insert command is different . Verry weird !!! Regards , Costin 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.