TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ScottMC 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
(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.
-
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.
(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))
-
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)))
-
Found one to make it using polyline but know there must be some way to get entmake to allow solid creation.
Use MakeEntmake (http://www.theswamp.org/index.php?topic=31145) to find your answer.
-
Thanks Crank and to Cab in particular looking for entmake stuff can be time consuming.
-
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.
(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)
)
-
Using Cab great code very useful.
;; 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
-
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.
-
Library regulars
-
Using Cab great code very useful.
Glad you found it useful. 8)