Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
20 Posts
0 Kudos
Registered: ‎08-30-2012
Post 1 of 3

Entmake Insert with Multiline Attributes.

480 Views, 2 Replies
08-30-2012 11:47 AM

I want to entmake a block with a multiline attribute. Entmaking the block definition works fine, but what do I code for the Multiline Attribute? Should it be coded (0 . "MTEXT") instead of (0 . "ATTRIB")? I know (101 . "Embedded Object") does not work. What other codes need to be included?

 

THANX

Mentor
263 Posts
3 Kudos
Registered: ‎12-04-2009
Post 2 of 3

Re: Entmake Insert with Multiline Attributes.

08-30-2012 05:04 PM in reply to: anim8er3

Hui....

Spoiler
:smileywink:

Please  you upload here one block example in the version autocad2004...

 

 

Contributor
20 Posts
0 Kudos
Registered: ‎08-30-2012
Post 3 of 3

Re: Entmake Insert with Multiline Attributes.

08-31-2012 06:26 AM in reply to: diagodose2009

This code will make the block definition:

 

(defun BLK-TEST (/ )
(entmake (list '(0 . "BLOCK") '(100 . "AcDbEntity")  '(8 . "0") '(100 . "AcDbBlockBegin") '(70 . 2) '(10 0.0 0.0 0.0) '(2 . "MTRL-TBL-BOD") '(1 . "")))
(entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbPolyline") '(90 . 4) '(70 . 0) '(43 . 0.0) '(38 . 0.0) '(39 . 0.0) '(10 0.0 -9.6) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) '(10 0.0 -19.2) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) '(10 104.981 -19.2) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) '(10 104.981 -9.6) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) '(210 0.0 0.0 1.0)))
(entmake (list '(0 . "LINE") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbLine") '(10 6.8 -9.6 0.0) '(11 6.8 -19.2 0.0) '(210 0.0 0.0 1.0)))
(entmake (list '(0 . "LINE") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbLine") '(10 24.0 -9.6 0.0) '(11 24.0 -19.2 0.0) '(210 0.0 0.0 1.0)))
(entmake (list '(0 . "ATTDEF") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbText") '(10 1.68571 -15.4 0.0) '(40 . 2.0) '(1 . "1") '(50 . 0.0) '(41 . 0.8) '(51 . 0.0) '(7 . "Text_MTRL") '(71 . 0) '(72 . 1) '(11 3.4 -14.4 0.0) '(210 0.0 0.0 1.0) '(100 . "AcDbAttributeDefinition") '(280 . 0) '(3 . "Material Number") '(2 . "NO") '(70 . 0) '(73 . 0) '(74 . 2) '(280 . 1)))
(entmake (list '(0 . "ATTDEF") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbText") '(10 13.1905 -15.4 0.0) '(40 . 2.0) '(1 . "0") '(50 . 0.0) '(41 . 0.8) '(51 . 0.0) '(7 . "Text_MTRL") '(71 . 0) '(72 . 1) '(11 15.4 -14.4 0.0) '(210 0.0 0.0 1.0) '(100 . "AcDbAttributeDefinition") '(280 . 0) '(3 . "QUANTITY") '(2 . "QTY") '(70 . 0) '(73 . 0) '(74 . 2) '(280 . 1)))
(entmake (list '(0 . "ATTDEF") '(100 . "AcDbEntity") '(67 . 1) '(8 . "TABLE_MTRL") '(100 . "AcDbText") '(10 26.4 -15.4 0.0) '(40 . 2.0) '(1 . "") '(50 . 0.0) '(41 . 0.8) '(51 . 0.0) '(7 . "Text_MTRL") '(71 . 0) '(72 . 0) '(11 26.4 -14.4 0.0) '(210 0.0 0.0 1.0) '(100 . "AcDbAttributeDefinition") '(280 . 0) '(3 . "DESCRIPTION") '(2 . "DESC") '(70 . 0) '(73 . 0) '(74 . 2) '(280 . 1) '(71 . 4) '(72 . 0) '(11 26.4 -14.4 0.0) '(101 . "Embedded Object") '(10 26.4 -14.4 0.0) '(40 . 2.0) '(41 . 76.0) '(46 . 0.0) '(71 . 4) '(72 . 5) '(1 . "\\W0.8000;") '(7 . "Text_MTRL") '(210 0.0 0.0 1.0) '(11 1.0 0.0 0.0) '(42 . 0.0) '(43 . 0.0) '(50 . 0.0) '(73 . 1) '(44 . 1.0)))
(entmake (list '(0 . "ENDBLK") '(100 . "AcDbEntity")  '(8 . "0") '(100 . "AcDbBlockEnd")))
)

 

I found that if I entmake the block insert with a regular attribute, it "works" with the stipulation that I have to run BATTMAN (or other method) to update the insert. Only then does the attribute change to multi-line. I would prefer to make it directly, that is the DXF code I'm trying to figure out.

 

THANX.....

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!