TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Jim2018 on June 17, 2022, 05:55:12 PM

Title: Entmake insert problem
Post by: Jim2018 on June 17, 2022, 05:55:12 PM
I need your help in a problem with a routine. The entmake_insert.lsp which introduces a block with attributes. This routine is a part of a program which automatically finds the outline of a closed shape and extracts its description. The block has already been created. While in the AutoCAD 2000 and AutoCAD 2008 it operates normally, in AutoCAD 2017 the result is nil and does not insert the block. It is noteworthy that in the previous version operating with (command "insert") it was functioning normally in all three versions. That means that I have forgotten something in entmake's composition but I do not know who it is. Any help accepted.
Title: Re: Entmake insert problem
Post by: d2010 on June 25, 2022, 01:04:13 AM
If you pay me, then I can decode youe'BLock to Lisp'Generator.
I use same tips with this guy, bellow
https://dansmark.com/Other-software/Lisp_detail.htm
Title: Re: Entmake insert problem
Post by: Jim2018 on June 25, 2022, 04:24:55 AM
I have not yet understood that I have no answer to the problem of the code I sent. Have I done something wrong?
Title: Re: Entmake insert problem
Post by: BIGAL on June 25, 2022, 08:41:55 PM
What I use as example for attribute.

Code: [Select]
(entmake (list (cons 0 "ATTDEF")
       (cons 8 "0")
       (cons 10 (list 0 0 0))
       (cons 1 "1") ; default value
       (cons 2 blkname) ; nblock name
       (cons 3 "Ptnum") ; tag name
       (cons 6 "BYLAYER")
       (cons 7 "STANDARD") ;text style
       (cons 8 "0") ; layer
       (cons 11 (list 0.0 0.0 0.0)) ; text insert pt
       (cons 39 0)
       (cons 40 3.5) ; text height
       (cons 41 1) ; X scale
       (cons 50 0) ; Text rotation
       (cons 51 0) ; Oblique angle
       (cons 62 256) ; by layer color
       (cons 70 0)
       (cons 71 0) ;Text gen flag
       (cons 72 1) ; Text Justify hor 1 center
       (cons 73 0) ; field length
       (cons 74 2) ; Text Justify ver 2 center
       (cons 210 (list 0 0 1))
  ))