Jump to content
Costinbos77

command MLeader with Block in AutoCAD Map 2021

Recommended Posts

Costinbos77

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 ?

1946076852_mLeader2.jpg.6ef474b8f4be9ba34b20db31553b6b22.jpg

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 :

426443734_mLeader3.jpg.86733b621cf04e331c794b67c0d718a4.jpg

 

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 by Costinbos77

Share this post


Link to post
Share on other sites
ronjonp

Try setting ATTREQ to 0 ?

Share this post


Link to post
Share on other sites
Costinbos77
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 by Costinbos77

Share this post


Link to post
Share on other sites
Costinbos77

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 .

646834438_mLeader2.jpg.f4ea39fe41a4ee7937fda25fefffa5fd.jpg

Does that mean the insert command is different ?

 

Regards ,

 

Costin

Share this post


Link to post
Share on other sites
ronjonp
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 .

646834438_mLeader2.jpg.f4ea39fe41a4ee7937fda25fefffa5fd.jpg

Does that mean the insert command is different ?

 

Regards ,

 

Costin

Same here in vanilla 2021

Share this post


Link to post
Share on other sites
Costinbos77

Thanks ronjonp  ,

 

that means from AutoCAD 2021 , the insert command is different .

 

Verry weird !!!🤢

 

Regards ,

 

Costin

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...