Author Topic: Entmake insert problem  (Read 795 times)

0 Members and 1 Guest are viewing this topic.

Jim2018

  • Mosquito
  • Posts: 16
Entmake insert problem
« 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.

d2010

  • Bull Frog
  • Posts: 323
Re: Entmake insert problem
« Reply #1 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

Jim2018

  • Mosquito
  • Posts: 16
Re: Entmake insert problem
« Reply #2 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?

BIGAL

  • Swamp Rat
  • Posts: 1398
  • 40 + years of using Autocad
Re: Entmake insert problem
« Reply #3 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))
  ))
A man who never made a mistake never made anything