Lee Mac Posted April 21, 2009 Posted April 21, 2009 I am trying to entmake a block definition which includes some solid hatching, in reference to this thread: http://www.cadtutor.net/forum/showthread.php?t=35213 However, I am lost as to what parameters to specify in the entmake list. I would appeciate any help on how to create the necessary table I thank you for your time and patience. Cheers Lee EDIT: Managed to work it out for myself - but any tips or pointers that anyone might have are welcomed Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Lee, Attached is a typical block definition with hatching for your reference. Need anything else, Jusk ask. The Buzzard Voice-Data-Outlet-Flor-DEF.txt Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Also take note that the order of the DXF information is critical to its operation Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 I use the attached code to extract the DXF information and use it int the order displayed. PRINTDXF2.LSP Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 Many thanks Buzzard - I selected the hatch that I had manually created and used it as a reference in the end - but it was deciding which values needn't be in the entmake reference which was causing the issue - but thank you for your reference and LISP Oh, and btw I re-wrote your LISP more succinctly for you (defun c:pdxf (/ pick) (if (setq pick (car (entsel "\nSelect Object: "))) (foreach x (entget pick) (print x))) (princ)) Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 Many thanks Buzzard - I selected the hatch that I had manually created and used it as a reference in the end - but it was deciding which values needn't be in the entmake reference which was causing the issue - but thank you for your reference and LISP Oh, and btw I re-wrote your LISP more succinctly for you (defun c:pdxf (/ pick) (if (setq pick (car (entsel "\nSelect Object: "))) (foreach x (entget pick) (print x))) (princ)) Or if you wanted the textscreen: (defun C:pdxf (/ pick) (if (setq pick (car (entsel "\nSelect Object: "))) (progn (textscr) (foreach x (entget pick) (print x)))) (princ)) Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Take note to the values I use verses the ones the program supplies. At the top of the the data I believe there is only one value you need to remove. Hatches in entity make are very sensative in a way to recreate. Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 A better routine fix -- i addicted too quickly... Deals with sub-ents as well: (defun c:en (/ Obj eNxt) (if (setq Obj (car (entsel "\nSelect Object: "))) (progn (textscr) (foreach x (entget Obj) (print x)) (if (setq eNxt (entnext Obj)) (while (not (eq "SEQEND" (cdadr (entget eNxt)))) (princ "\n\nSub:\n") (foreach x (entget eNxt) (print x)) (setq eNxt (entnext eNxt)))))) (princ)) Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 You leave out DXF data -1 & 330 which are for the entity name Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 But also, it seems with the Hatch, you leave out a few others at the very end, such as this lot.... (450 . 0) (451 . 0) (460 . 0.0) (461 . 0.0) (452 . 1) (462 . 1.0) (453 . 2) (463 . 0.0) (63 . 5) (421 . 255) (463 . 1.0) (63 . 7) (421 . 16777215) (470 . "LINEAR") Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Those were not returned when I selected my hatch? Where is those from? Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 I made a solid fill hatch of a polyline. Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 I see now. You are veiwing the DXF help reference . I only use what the program returns for a particular hatch and leave out entity name -1 & 330. Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 I just used the DXF printer (that I posted earlier) on a solid hatch? Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Ok I understand now. The hatch in the file I gave you was ANSI31. Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Just did a solid fill myself Here is what I would leave out. Refer to DXF section in help file for optional DXF data. (-1 . <Entity name: 7ef65010>) ;LEAVE OUT (0 . "HATCH") (330 . <Entity name: 7ef59cf8>) ;LEAVE OUT (5 . "28A") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbHatch") (10 0.0 0.0 0.0) (210 0.0 0.0 1.0) (2 . "SOLID") (70 . 1) (71 . 1) (91 . 1) (92 . 1) (93 . 4) (72 . 1) (10 37.7529 10.9995 0.0) (11 37.7529 31.667 0.0) (72 . 1) (10 37.7529 31.667 0.0) (11 17.0855 31.667 0.0) (72 . 1) (10 17.0855 31.667 0.0) (11 17.0855 10.9995 0.0) (72 . 1) (10 17.0855 10.9995 0.0) (11 37.7529 10.9995 0.0) (97 . 1) (330 . <Entity name: 7ef65008>) (75 . 0) (76 . 1) (98 . 1) (10 0.0 0.0 0.0) (450 . 0) (451 . 0) (460 . 0.0) (461 . 0.0) (452 . 1) (462 . 1.0) (453 . 2) (463 . 0.0) (63 . 5) (421 . 255) (463 . 1.0) (63 . 7) (421 . 16777215) (470 . "LINEAR") Quote
Lee Mac Posted April 21, 2009 Author Posted April 21, 2009 Ok, thanks Buzzard btw, did you see my updated code fix? Quote
wizman Posted April 21, 2009 Posted April 21, 2009 use entmakex instead of entmake, and you dont need to leave out any what entget gives. Quote
The Buzzard Posted April 21, 2009 Posted April 21, 2009 Yes I just used it. I posted a thank you before. Thanks Again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.