Author Topic: How-to entmake solid arrow.  (Read 1691 times)

0 Members and 1 Guest are viewing this topic.

ScottMC

  • Newt
  • Posts: 191
How-to entmake solid arrow.
« on: October 22, 2022, 09:59:24 PM »
Found one to make it using polyline but know there must be some way to get entmake to allow solid creation. Here's the one I've used to try to convert but can't get it..

https://www.theswamp.org/index.php?topic=3117.msg39113#msg39113

Code: [Select]
(defun SetBlk (n)
  (and (not (tblsearch "BLOCK" n))
       (eval (list (read n)))))

(defun arr ()
(entmake '((0 . "BLOCK") (2 . "ARR")(70 . 0)(10 0 0 0)))
(entmake '((0 . "POLYLINE")(8 . "0")(66 . 1)(10 0 0 0)))  ;; << --
(entmake '((0 . "VERTEX")(8 . "0")(10 -12 0 0)))
(entmake '((0 . "VERTEX")(8 . "0")(10 0 0 0)))
(entmake '((0 . "VERTEX")(8 . "0")(10 -8 8 0)))
(entmake '((0 . "VERTEX")(8 . "0")(10 8 0 0)))
(entmake '((0 . "VERTEX")(8 . "0")(10 -8 -8 0)))
(entmake '((0 . "VERTEX")(8 . "0")(10 0 0 0)))
(entmake '((0 . "SEQEND")(8 . "0")))
(entmake '((0 . "ENDBLK"))))


Any help will be appreciated.

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: How-to entmake solid arrow.
« Reply #1 on: October 23, 2022, 12:05:23 AM »
Adding solid is about sequence of points do manualy 1 2 3 2 4 enter

Should be able to do multiple points this makes 1 of 2 solids. Just do bottom also.

Code: [Select]
(entmake '((0 . "SOLID") (410 . "Model") (8 . "0")(10 -8.0 8.0 0.0) (11 8.0 0.0 0.0) (12 0.0 0.0 0.0) (13 0.0 0.0 0.0)))
((0 . "SOLID") (410 . "Model") (8 . "0") (10 -8.0 8.0 0.0) (11 8.0 0.0 0.0) (12 0.0 0.0 0.0) (13 0.0 0.0 0.0))

« Last Edit: October 23, 2022, 12:32:05 AM by BIGAL »
A man who never made a mistake never made anything

ScottMC

  • Newt
  • Posts: 191
Re: How-to entmake solid arrow.
« Reply #2 on: October 23, 2022, 08:23:47 AM »
Excellent. Thanks BIGAL. This gets me going!

(entmake '((0 . "SOLID")(410 . "Model")(8 . "0")
    (10 0.0 -4.0 0.0) (11 21.0 0.0 0.0) (12 0.0 4.0 0.0) (13 0.0 -4.0 0.0)))

Crank

  • Water Moccasin
  • Posts: 1503
Re: How-to entmake solid arrow.
« Reply #3 on: October 23, 2022, 10:01:11 AM »
Found one to make it using polyline but know there must be some way to get entmake to allow solid creation.

Use MakeEntmake to find your answer.
Vault Professional 2023     +     AEC Collection

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: How-to entmake solid arrow.
« Reply #4 on: October 23, 2022, 07:36:43 PM »
Thanks Crank and to Cab in particular looking for entmake stuff can be time consuming.
A man who never made a mistake never made anything

ScottMC

  • Newt
  • Posts: 191
Re: How-to entmake solid arrow.
« Reply #5 on: October 23, 2022, 07:49:31 PM »
Took the 'David Bethel' and attempted to get it to finish by creating a block but not able [failed]. Here's my attempt with xed block part.. Makes a solid which is OK.
Oops.. seems line 25 unecessary as item is created before with entmake solid.

Code: [Select]
(defun c:pi (/ )
    (defun SetBlk (n)
  (and (not (tblsearch "BLOCK" n))
       (eval (list (read n)))))
       
(defun arr ( / )
    (vl-load-com)

    ; (entmake '((0 . "BLOCK")
       ; (8 . "0") ;; assigned layer
         ; (2 . "ARR") ;; block created
         ; (10 0.0 0.0 0.0) ; base point
      ; ))

(entmake '((0 . "SOLID")(8 . "0")
  (10 0.0 -0.09 0.0)
  (11 0.54 0.0 0.0)
  (12 0.0 0.09 0.0)
  (13 0.0 -0.09 0.0)))
)
  (entmake '((0 . "SEQEND")(8 . "0")))
;(entmake '((0 . "ENDBLK")(8 . "0")))

(SetBlk "ARR") ;; ? confirm/safe block isn't [L-2]
[color=red];;(ARR) ;; call the entity to build[/color] causes duplicate
(command "move" "L" "" "0,0,0" "\\" "rotate" "L" "" (getvar 'lastpoint) "\\")
(princ)
)

« Last Edit: October 24, 2022, 08:23:44 PM by ScottMC »

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: How-to entmake solid arrow.
« Reply #6 on: October 24, 2022, 07:19:30 PM »
Using Cab great code very useful.

Code: [Select]
;; Revision :10/25/2022 @10:18
(defun c:eMake ()
  (entmake '((0 . "SOLID") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbTrace") (10 -8.0 8.0 0.0) (11 0.0 0.0 0.0) (12 8.0 0.0 0.0) (13 -8.0 -8.0 0.0) (39 . 0.0)))
  (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (2 . "ARR") (10 0.0 0.0 0.0) (70 . 0)))
  (entmake '((0 . "POLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDb2dPolyline") (66 . 1) (10 0.0 0.0 0.0) (70 . 0) (40 . 0.0) (41 . 0.0) (71 . 0) (72 . 0) (73 . 0) (74 . 0) (75 . 0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 -12.0 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 0.0 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 -8.0 8.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 8.0 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 -8.0 -8.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbVertex") (100 . "AcDb2dVertex") (10 0.0 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (70 . 0) (50 . 0.0)))
  (entmake '((0 . "SEQEND") (100 . "AcDbEntity") (67 . 0) (8 . "0")))
  (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0")))
  (princ)
) ; end eMaker
A man who never made a mistake never made anything

ScottMC

  • Newt
  • Posts: 191
Re: How-to entmake solid arrow.
« Reply #7 on: October 24, 2022, 08:46:12 PM »
Now getting into entmake, I'll probably work a library of regulars to make the block unecessary. I'll try CAB's maker, that will probably make the writing easier.

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: How-to entmake solid arrow.
« Reply #8 on: October 25, 2022, 03:17:53 AM »
Library regulars

A man who never made a mistake never made anything

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How-to entmake solid arrow.
« Reply #9 on: October 30, 2022, 09:44:00 AM »
Using Cab great code very useful.
Glad you found it useful. 8)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.