Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. masterfal

    closed polyline with automatic hatch

    Ahh i see.. i knew was going to be something like that, just couldnt work out exactly what to change. Works like a charm. Appreciate the help! one thing i just noticed though is its not actually drawing the hatch in the correct layer. its drawing the polyline in the correct layer (which gets removed at the end) but the layer the hatch is being put in is whatever layer is set in the hatch dialog box when you run the hatch command. basically just using the previous layer that was used when doing hatch. how can i fix so it drops the hatch into my specified layer?
  3. masterfal

    closed polyline with automatic hatch

    how am i creating polyline? what do you mean..? i just click the points where i want my polyline and c to close. isn't that how everyone does it? i need the hatch in specific hatch layer which would rarely be my current layer + the correct hatch pattern wont always be the last used so i thought setting a little routine that specifies layer and hatch pattern would be the quickest way. this way i just type plh, enter, click click click with mouse, c to close and thats it. surely thats gotta be quicker than running original -hatch and manually entering required hatch/layer types?
  4. Today
  5. It's been a LONG time since posting, so forgive me if I'm posting in the wrong section or whatnot. I've got a 3D drawing that I'm trying to plot using the HIDDEN visual style, but the properties window (when no objects are selected) is showing 2D Wireframe (and that is indeed what the drawing is showing as). How do I change the visual style in paper space to my desired style?? I searched the forum and didn't find anything on this one. Is it a system setting??? Please help. I've attached a photo of the properties box.
  6. Yesterday
  7. @Saxlle I realised should check which way line is drawn. So it will order based on end selected. A reverse of the block list where applicable. The "-insert" not sure if your missing, 1 1 0 the extra one, you can imply "S" 1 gets around the scale problem. command "-INSERT" blkname "s" 1 pt 0.0) I used copy so that the block is copied then don't need to worry about attributes.
  8. ...Continue from previous post, experiment with imperial multiplication. Phh ##****************************************************************************************** ## 41 UDF/ Excel name: impMul() - Imperial multiply (imperial * imperial), with optional ## arguments round off [rd_Off] and suppress trailing [suppress_trailing_label]. ## ## Note: This function uses todec() and toimpa as sub-functions. ## ## Notes with 2 input parameters - scenarios: ## ## [decimal] x [decimal] = return decimal value (just like normal multiplication) ## [decimal] x [imperial feet-inches (or vice versa)] = return (linear) feet-inches ## [imperal feet-inches] x [imperal feet-inches] = return decimal ft² (if less than 1 ft² ## return decimal in²) ## ## Optional number round off digits, applied for decimal ft² or decimal in² only. ## Optional suppress trailing (any character/number) = suppress label ft² or in² ## ## Rev. 1.0 - 7/23/2025 ##****************************************************************************************** =LAMBDA(varImp1,varImp2,[rd_Off],[suppress_trailing_label], LET(rd,IF(ISOMITTED(rd_Off),4,INT(rd_Off)), tr,IF(ISOMITTED(suppress_trailing_label),1,0), IF(AND(ISNUMBER(varImp1),ISNUMBER(varImp2)), varImp1*varImp2, IF(AND(ISTEXT(varImp1),ISTEXT(varImp2)), IF(ABS(todec(varImp1)*todec(varImp2))>=144, IF(tr=0,ROUND((todec(varImp1)*todec(varImp2))/144,rd),ROUND((todec(varImp1)*todec(varImp2))/144,rd)&" ft²"), IF(tr=0,ROUND((todec(varImp1)*todec(varImp2)),rd),ROUND((todec(varImp1)*todec(varImp2)),rd)&" in²")), toimpa(todec(varImp1)*todec(varImp2)) ) ) ) )
  9. @devitg Yours works great. the only thing I would like to add is to set a distance between blocks on the line, just like the copyblockstocurve has. @Saxlle Yours also works, but if block doesn't have scale uniformly set to 1, it asks to type scale, rotation and attribute value, and it goes block by block. Its unnessery.
  10. pkenewell

    closed polyline with automatic hatch

    @SLW210 That's true! the command could be boiled down to this below if you don't want a polyline boundary. However, the PLINE command has more options, and there are 2 extra returns that you have to press at the end to complete the command - that's why I would stick to the original. (defun C:PLH (/ e el) (command "._-hatch" "_Pro" "ANSI34" "10.0" "90" "_W" "_N") (while (= (logand (getvar "cmdactive") 1) 1) (command pause) ) (princ) )
  11. pkenewell

    closed polyline with automatic hatch

    @masterfal Simple - just replace the the options in the command statement for the -HATCH command ; Replace Hatch command line (command "._-hatch" "_pro" "_S" "_S" e "" "") with: (command "._-hatch" "_Pro" "ANSI34" "10.0" "90" "_S" e "" ""); where after "Pro" (properties), the arguments are [Pat. Name] [Scale] [Rotation]
  12. leonucadomi

    ATTDEF COUNT...help

    sorry , I will try to explain myself again the routine you created selects texts and attributes, that's excellent. What I would like you to show is... example: color green texts color yellow ATTDEF att That is, of the total number of selected objects, how many are texts and how many are ATTDEF , regardless of how many times its tags are repeated. another example: number of selected texts : 6 number of selected ATTDEF : 3 I needed Excel to account for them, but if all the amounts are shown here it is very helpful and Excel is not necessary. thanks
  13. I got it now, very fast double extend now. Current settings: Projection=UCS, Edge=None, Mode=Standard then Fence option. If I recall you used to be able to double extend with crossing as well. If I get time I'll dig a little deeper. You have to be careful any extra crossings will send the extend through the closed shapes.
  14. How are you creating the polyline? You can use -Hatch with the "draW boundary" option, just a few clicks for a solid hatch on current layer.
  15. My contribution, you can try it: (prompt "\nTo run a LISP type: CPBLK") (princ) (defun c:CPBLK ( / old_osmode old_attdia ent ptlist spt ept delta num_offset npt ss len i val data block_name data tag_value num ct) (setq old_osmode (getvar 'osmode)) (setq old_attdia (getvar 'attdia)) (setvar 'attdia 0) (setq ent (car (entsel "\nPick the LINE:\n")) ptlist (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget ent))) spt (vlax-curve-getStartPoint (vlax-ename->vla-object ent)) ept (vlax-curve-getEndPoint (vlax-ename->vla-object ent)) delta (- (car ept) (car spt)) num_offset (/ delta (length ptlist)) npt (getpoint "\Pick insertation point for new LINE:") ) (setvar 'osmode 0) (command-s "_LINE" npt (strcat "@" (rtos delta) "<" (itoa 0)) "") (setq ss (ssget "_F" ptlist (list (cons 0 "INSERT"))) len (sslength ss) i 0 val (list) ) (while (< i len) (setq data (entget (ssname ss i)) block_name (cdr (assoc 2 data)) ) (while (/= (cdr (assoc 0 data)) "SEQEND") (setq data (entget (entnext (cdr (assoc -1 data)))) tag_value (cdr (assoc 1 data)) val (append val (list (list tag_value block_name))) ) ) (setq i (1+ i)) ) (setq val (vl-remove-if-not '(lambda (x) (/= (car x) nil)) val) num 0 ct 0 ) (repeat (length val) (command-s "-insert" block_name (list (+ (car npt) num) (cadr npt)) 1 0 (car (nth ct val))) (setq num (+ num num_offset) ct (1+ ct) ) ) (setvar 'osmode old_osmode) (setvar 'attdia old_attdia) (prompt (strcat "\nCopied " (itoa (length val)) " blocks along path.")) (princ) ) and it looks like on the .mp4: Recording2025-07-24at08.56.33-ezgif.com-gif-to-mp4-converter.mp4
  16. Hi guys. It's been more than 10 years, but the problem/bug still occurs in AutoCAD 2025. However, after opening a thread in another Forum, I found a solution. Sharing with you here what worked for me. The bold text bug behaviour (that also occurs for other elements) was solved here by instead of printing directly from AutoCAD to the printer, first I PDF the drawing, and then I print from the PDF. This bug is being generated by the direct communication from AutoCAD to the Printer, but for some unknown reason, AutoCAD doesn't generate the same bug when the PDF printer is used. Cheers
  17. masterfal

    closed polyline with automatic hatch

    Hi All, managed to tweak this code slightly so it draws into a specific layer and then removes the polyline at the end so you are just left with solid hatch. just wondering if i wanted to specify a certain hatch pattern instead of solid (eg ANSI34 with scale of 10 and angle of 90) how would i do that? (defun C:PLH (/ e el old_layer hatch_ent) ;; Store the current layer (setq old_layer (getvar "clayer")) ;; Set the desired layer for the polyline and hatch (command "._layer" "_m" "layernamehere" "") ; Create layer if it doesn't exist (command "._layer" "_s" "layernamehere" "") ; Set current layer (command "._pline") (while (= (logand (getvar "cmdactive") 1) 1) (command pause) ) (if (and (setq e (entlast)) ; 'e' now holds the entity name of the polyline (setq el (entget e)) (= (cdr (assoc 0 el)) "LWPOLYLINE") (= (logand (cdr (assoc 70 el)) 1) 1) ) (progn (command "._-hatch" "_pro" "_S" "_S" e "" "") (setq hatch_ent (entlast)) ; Get the entity name of the newly created hatch (entdel e) ; Delete the polyline using its entity name 'e' ) (princ "\nInvalid Polyline Created (Must be complete and Closed).") ) ;; Restore the original layer (command "._layer" "_s" old_layer "") (princ) )
  18. BIGAL

    ATTDEF COUNT...help

    " how many times each tag is repeated. " that is in the answer I provided. (("048" 1) ("047" 1) ("046" 1) ("045" 2) ("044" 1) ("043" 2) ("042" 1) ("041" 2) ("040" 1) ("039" 1) ("038" 2) ("037" 1) ("036" 2) ("035" 2) ("034" 6) ("033" 6) ("032" 6) ("031" 2) ("030" 2) ("029" 12) ("028" 6) ("027" 6) ("026" 23) ("025" 2) ("024" 4) ("023" 6) ("022" 6) ("021" 1) ("020" 1) ("019" 2) ("018" 2) ("017" 1) ("016" 1) ("015" 2) ("014" 6) ("013" 2) ("012" 2) ("011" 2) ("010" 1) ("009" 1) ("008" 1) ("007" 1) ("006" 4) ("005" 16) ("004" 1) ("003" 1) ("002" 1) ("001" 1)) change code at end add princ lst3 ) (princ lst3) (princ) ) I can do the send to excel if you want ? You have asked for text also can you post anther sample dwg with say both, text and Attdef. Will have a think about missing value.
  19. GLAVCVS

    ATTDEF COUNT...help

    var1, var2, and var3 should be "punto," "angulo," and "distancia"? So: angle and distance... between what objects?
  20. You don't draw a line read the questions asked, pick the pline, pick the block, pick a point to draw the line & blocks and enter a gap distance between them say 1000. The line with copied blocks is automatically drawn. The line will be as long as there is blocks.
  21. Here is the help for Extend it has some variables you can set may be applicable for Acad. https://help.bricsys.com/en-us/document/command-reference/e/extend-command?version=V25&id=165079077042
  22. Last week
  23. GLAVCVS

    ATTDEF COUNT...help

    ;BACALADO DE BILBADOOO (PLUS) (defun nqf (tuSS / i lista tipObj cant cad txs atts) (princ "\nNumero que falta") (terpri) (if tuSS (setq cant (sslength tuSS)) (progn (alert "No existe conjunto de seleccion o esta vacio") (exit) ) ) (princ "\nCantidad de textos seleccionados = ") (princ cant) (princ "\nLista de numeros faltantes") ;Pasar del SS a una lista de valores (setq i 0 txs 0 atts 0) (repeat (sslength tuSS) (setq tipObj (cdr (assoc 0 (setq le (entget (ssname tuSS i))))) num (atoi (cdr (assoc (if (= tipObj "TEXT") 1 2) le))) i (1+ i) lista (if (setq l (assoc num lista)) (subst (list num (1+ (cadr l))) l lista) (append lista (list (list num 1))) ) ) (if (= tipObj "TEXT") (setq txs (+ txs 1)) (setq atts (+ atts 1))) ) ;Imprimir los valores que no aparezcan (terpri) (setq i 1) (princ (strcat "\nLista de numeros existentes\n" (while lista (if (setq v (assoc i lista)) (setq cad (if (= (cadr v) 1) (if cad (strcat cad ", " (itoa (car v))) (itoa (car v)) ) (if cad (strcat cad ", " (itoa (car v)) "(" (itoa (cadr v)) ")") (strcat (itoa (car v)) "(" (itoa (cadr v)) ")") ) ) lista (vl-remove v lista) ) (princ (strcat "\nFalta el # " (itoa i))) ) (setq i (1+ i)) cad ) "\nTextos: " (itoa txs) "\nAtributos: " (itoa atts) ) ) (princ) ) (defun c:nqf nil (nqf (ssget '((0 . "TEXT,ATTDEF")))))
  24. @SLW210 it ask for the polyline where the blocks are inserted, then get the coordinates from such polyline , and use it to get all blocks as selectionset . It draw a polyline straight long enough to receive the new block at a given distance, 1000 units in this cas Then it copy each one and move to the new line
  25. Your latest works in AutoCAD 2000i on my home computer, though it makes a new line was that intended? I like yours a lot.
  26. I used the one supplied by the OP.
  27. Holy Old Post bump!!!! Yeah i was looking to do just this today.. totally forgot how... thanks to this thread.. i figured it out. Use the POLAR parameter, start point at the center of rotation, end point at the point you want the stretch to end. Add the POLAR STRETCH action to the SECOND point. Select the objects you want to stretch, like the line and end arrow. Select the object you want to rotate, like the line, end arrow and the triangular arrow near the circle. Boom Done Bob's your Uncle. DynBlock101.dwg
  28. @SLW210 @HypnoS edited please test. cpy-blk-2-poly.lsp
  29. @SLW210 please upload sample dwg , where yo did apply the lisp
  1. Load more activity
×
×
  • Create New...