Leaderboard
Popular Content
Showing content with the highest reputation on 03/09/2022 in all areas
-
This will hide them. Regen to bring them back. (defun C:ALL-OLE (/ SS) (if (setq SS (ssget "_X" '((0 . "OLE2FRAME")))) (foreach obj (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (redraw obj 2) ;(entdel obj) ;if you just want to delete them ) ) )2 points
-
I dont know why no suggestion like this, Pick a text and use bpoly, then remember entlast and use it with hatch then erase bpoly so simple a lisp. Can do all in one go you need to describe what is next step like how each hatch will be different in each boundary. A side comment this has been answered numerous times with answers like, random color or from a list of hatches or changing hatch angle per boundary and so on.2 points
-
1 point
-
Or as other people know it, it is run to rise. Horizontal measurement before vertical measurement. Best make sure which way round, otherwise the slopes will exceed the natural angle of repose and there will be landslides.1 point
-
This is an expression of rise to run as a ratio. In this case it means that for every 1.5 units the line rises, it runs 1 unit. That means the slope of the line is 1.5:1.1 point
-
Like Steven P draw the 2 lines and copy pline up, trim using window is your friend all done. Manual version. Ps use copy as a pline will change shape when using offset.1 point
-
In MTEXT type \U+0394 or \U+2206. The other option would be to click the Symbol button on the Ribbon then select any symbol that you need.1 point
-
; each matchprop - text to text, ~line to ~line, hatch to hatch. - 2022.03.08 exceed ; command : mma ; Note - If you select multiple original object, the first in the selection set will be selected. (vl-load-com) (defun c:mma ( / *error* ss_o ss_o_t ss_o_l ss_o_h ss_o_t_1 ss_o_l_1 ss_o_h_1 ss_t ss_t_t ss_t_l ss_t_h) (setvar 'cmdecho 0) (LM:startundo (LM:acdoc)) ;error control (defun *error* ( msg ) (LM:endundo (LM:acdoc)) (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*")) (princ (strcat "\n Error: " msg)) ) (setvar 'cmdecho 1) (princ) ) (princ "\n each matchprop - text to text, ~line to ~line, hatch to hatch.\n select original object :") (setq ss_o (ssget)) (if (/= ss_o nil) (progn (setq ss_o_t (ssget "P" (list (cons 0 "*TEXT")))) (if (/= ss_o_t nil) (setq ss_o_t_1 (ssname ss_o_t 0)) ) (command "_.select" ss_o "") (setq ss_o_l (ssget "P" (list (cons 0 "*LINE")))) (if (/= ss_o_l nil) (setq ss_o_l_1 (ssname ss_o_l 0)) ) (command "_.select" ss_o "") (setq ss_o_h (ssget "P" (list (cons 0 "HATCH")))) (if (/= ss_o_h nil) (setq ss_o_h_1 (ssname ss_o_h 0)) ) );end of progn );end of if (princ "\n select target object :") (setq ss_t (ssget)) (if (and (/= ss_t nil) (/= ss_o nil)) (progn (setq ss_t_t (ssget "P" (list (cons 0 "*TEXT")))) (if (and (/= ss_t_t nil) (/= ss_o_t nil)) (progn (command "_.matchprop" ss_o_t_1 ss_t_t "") );end of progn );end of if (command "_.select" ss_t "") (setq ss_t_h (ssget "P" (list (cons 0 "HATCH")))) (if (and (/= ss_t_h nil) (/= ss_o_h nil)) (progn (command "_.matchprop" ss_o_h_1 ss_t_h "") );end of progn );end of if (command "_.select" ss_t "") (setq ss_t_l (ssget "P" '( (-4 . "<NOT") (-4 . "<OR") (0 . "*TEXT") (0 . "HATCH") (-4 . "OR>") (-4 . "NOT>")))) (if (and (/= ss_t_l nil) (/= ss_o_l nil)) (progn (command "_.matchprop" ss_o_l_1 ss_t_l "") ) );end of if ;(command "_.select" ss_t "") ;(setq ss_t_l (ssget "P" (list (cons 0 "*LINE,SOLID")))) ; (if (/= ss_t_l nil) ; (command "_.matchprop" ss_o_l_1 ss_t_l "") ; ) );end of progn );end of if (setvar 'cmdecho 1) (LM:endundo (LM:acdoc)) (princ) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) ;; Start Undo - Lee Mac ;; Opens an Undo Group. (defun LM:startundo ( doc ) (LM:endundo doc) (vla-startundomark doc) ) ;; End Undo - Lee Mac ;; Closes an Undo Group. (defun LM:endundo ( doc ) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) ) ) I made this because I got tired of classifying it with QSELECT and matching it, with layers that are not separated. Layers are very important. And in general, in my work, hatch often has properties different from line. The gif was hatched on the table.. but hatches usually in a tray or pipe. polyines are treated like lines. If there is no text or hatch, the properties of the text or hatch are not changed. The difference between inch and mm unit of hatch pattern file by measurement sysvar could not be resolved. I think that when I bring hatches of different measurement sysvars and paste them into one drawing, the hatch scale seems to be applied properly when the scale is modified once and then restored to the original value. Since there may be cases where the drawings are already mixed in the existing drawings, I could not modify them.1 point
-
That hatch pattern in your screen shot should have the area you're looking for.1 point
-
Is it just 1 closed polyline on Layer-1, and 1 on Layer -2? Can there be overlap, or is 2 nicely within 1? (no overlap would make it easier) Anyway, see if you're happy with this (vl-load-com) (defun drawM-Text (pt str) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 str)))) ;; ADC, for Area Deducting Cutout (defun c:adc ( / ss l1 l2 i ent lay area1 area2 area3 txt txtobj) ;; Step-1: After entering command user will select whole drawing in single selection (princ "\nSelect all objects: ") (setq ss (ssget (list (cons 0 "POLYLINE,LWPOLYLINE")))) ;; Step-2: Lisp will select only object in Layer-1 & Layer-2 (Other layers objects will be ignored) (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i)) ;; read layer (setq lay (cdr (assoc 8 (entget ent)))) (princ "\n") (princ lay) ;; Step-3: Lisp will calculated the area of Layer-1 & Layer-2 (if (= "Layer-1" lay) (progn (setq area1 (vla-get-area (vlax-ename->vla-object ent))) (princ " - area: ") (princ area1) ) ) (if (= "Layer-2" lay) (progn (setq area2 (vla-get-area (vlax-ename->vla-object ent))) (princ " - area: ") (princ area2) ) ) (setq i (+ i 1)) ) ;; Step-4: Now it will Subtract the area of Layer-2 from Layer-1 (setq area3 (- area1 area2)) ;; Step-5: and paste it as Text. (setq txt (strcat "Total Area: " (rtos area1 2 2) "\nCutout Area: " (rtos area2 2 2) "\nSubtracted Area: " (rtos area3 2 2) ) ) (drawM-Text (getpoint "\nPick a point to put the MText: ") txt) (princ) )1 point
-
Unfortunately, the person that should have your back is your P-F instructor. Instructors should be available to answer student questions regarding the assigned projects. They should have also provided a clear explanation of how to interpolate contour points between spot elevations in the project instructions. P-F is not known for providing helpful and timely assistance. They are, however, very good at separating a student from his/her money though. I hold them in the lowest regard. Seems they have not changed their ways even after all this time. Too bad.1 point
-
I end up posting these all over the forum, so I might as well post a lot of them in one place for those who are interested. _________________________________________________________ Explanation of the Apostrophe: http://www.cadtutor.net/forum/showpost.php?p=258390&postcount=20 Explanation of Logand/Logior: http://www.cadtutor.net/forum/showpost.php?p=298061&postcount=8 Working with Attributes: http://www.cadtutor.net/forum/showpost.php?p=330778&postcount=2 Explanation of Conditionals (CAB/Lee Mac) http://www.cadtutor.net/forum/showpost.php?p=173196&postcount=10 http://www.cadtutor.net/forum/showpost.php?p=240943&postcount=2 http://www.cadtutor.net/forum/showpost.php?p=273108&postcount=12 Selection Set to List http://www.cadtutor.net/forum/showpost.php?p=248285&postcount=2 Block rename: http://www.cadtutor.net/forum/showpost.php?p=242147&postcount=24 VL Method Differences: http://www.cadtutor.net/forum/showpost.php?p=258403&postcount=9 Starting LISP: http://www.afralisp.net/ http://www.jefferypsanders.com/autolisptut.html http://ronleigh.info/autolisp/index.htm More Advanced LISP Tutorials/Help: http://augiru.augi.com/content/library/au07/data/paper/CP311-4.pdf http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node1.html DCL Tutorials: http://www.jefferypsanders.com/autolisp_DCL.html http://www.afralisp.net/ Visual LISP Editor: http://www.afralisp.net/vl/vlisp.htm http://www.afralisp.net/vl/vl-edit.htm http://midpointcad.com/au/docs/lakose_The_Visual_LISP_Developers_Bible.pdf Error Handlers: http://www.afralisp.net/lispa/lisp6.htm http://www.cadtutor.net/forum/showthread.php?t=33966 http://www.cadtutor.net/forum/showpost.php?p=261049&postcount=3 -4 SelectionSets: http://www.afralisp.net/lisp/filter.htm http://www.theswamp.org/index.php?topic=28672.0 Layer Renaming: http://www.cadtutor.net/forum/showthread.php?t=38810 Attributes in VL: http://www.cadtutor.net/forum/showpost.php?p=259620&postcount=9 PaperSpace/ModelSpace Objects: http://www.cadtutor.net/forum/showpost.php?p=259934&postcount=13 Vla-File-Systime: http://www.cadtutor.net/forum/showthread.php?t=38331 Linking Objects with XData: http://www.cadtutor.net/forum/showpost.php?p=251211&postcount=12 Explanation of a LISP function (Text replacement): http://www.cadtutor.net/forum/showpost.php?p=264546&postcount=15 Explanation of a LISP function (Text Height Change): http://www.cadtutor.net/forum/showpost.php?p=306576&postcount=14 Explanation of a LISP function (Reinsert all blocks @ 0,0,0): http://www.cadtutor.net/forum/showpost.php?p=309366&postcount=15 SSGet Available Options: http://www.theswamp.org/index.php?topic=29972 Localising Variables: http://www.cadtutor.net/forum/showpost.php?p=265649&postcount=4 Express Tools Functions: http://www.afralisp.net/lisp/acet-utils.htm http://www.theswamp.org/index.php?action=dlattach;topic=28777.0;attach=12477 http://www.theswamp.org/index.php?topic=13719.0 http://www.theswamp.org/index.php?topic=19505.0 Entmake: http://www.theswamp.org/index.php?topic=4814.0 Undocumented LISP Functions: http://www.manusoft.com/cgi-bin/NoFrames.pl?referer=http://www.manusoft.com/resources/AcadExposed/Index.stm&header=Header.stm&toc=TOC.stm&main=Main.stm#AutoLISP Auto-Loading LISP (ACADDOC.lsp etc): http://www.theswamp.org/index.php?topic=9211.0 http://www.theswamp.org/index.php?topic=20492.0 http://www.cadtutor.net/faq/questions/53/How+do+I+automatically+load+variables%3F AutoCAD Command Prefixes: http://www.cadforum.cz/cadforum_en/qaID.asp?tip=2425 Deleting DWS Associations: http://www.cadtutor.net/forum/showthread.php?t=43380 Car/Cadr/Caddr Explained: http://ronleigh.info/autolisp/afude09.htm http://www.theswamp.org/index.php?topic=31473.0 Default Options: http://www.cadtutor.net/forum/showthread.php?t=39634 Script Writer: http://www.cadtutor.net/forum/showpost.php?p=295487&postcount=23 Demise of VBA: http://www.cadtutor.net/forum/showthread.php?t=32857 Command Vs Entmake Vs VL: http://rkmcswain.blogspot.com/2007/12/command-vs-entmake-vs-vla-add.html Explanation of Boole Function: http://www.cadtutor.net/forum/showpost.php?p=306339&postcount=9 Varying ways to Change Text Height: http://www.cadtutor.net/forum/showpost.php?p=296877&postcount=4 What are vl*,vlax* etc?: http://www.cadtutor.net/forum/showpost.php?p=318549&postcount=2 Setq Vs. Set: http://www.theswamp.org/index.php?topic=27226.msg328322#msg328322 AutoCAD Animation: http://www.cadtutor.net/forum/showthread.php?t=45146 http://www.cadtutor.net/forum/showthread.php?t=1202 http://www.cadtutor.net/forum/showthread.php?t=883 Safearrays/Variants: http://www.theswamp.org/index.php?topic=31674.0 http://www.theswamp.org/index.php?topic=29248.0 DDAtte2 (with visibility toggles): http://www.cadtutor.net/forum/showpost.php?p=308469&postcount=5 _________________________________________________________ Enjoy! Lee1 point
-
1 point
-
I would like to thank all the folks that helped me. I emailed p-f and still to this day have not received any help. If it was not for you folks helping I would still be stuck on the interpolating contour lines. I finally finished that part late last night. thanks, cfarr1 point
-
Another method: (defun c:FSum2 (/ Units Prec FldStr pt ss) ;; Lee Mac ~ 12.01.10 (vl-load-com) (setq Units 2 Prec 3) ;; Accuracy (setq doc (cond (doc) ((vla-get-ActiveDocument (vlax-get-Acad-Object))))) (setq FldStr "%<\\AcExpr \(") (if (and (ssget '((0 . "TEXT,MTEXT"))) (setq pt (getpoint "\nSelect Point for Field: "))) (progn (vlax-for obj (setq ss (vla-Get-ActiveSelectionSet doc)) (setq FldStr (strcat FldStr "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectId Obj)) ">%).TextString>% +"))) (vla-Delete ss) (vla-AddMText (vla-get-ModelSpace doc) (vlax-3D-point pt) 0. (setq FldStr (strcat (substr FldStr 1 (1- (strlen FldStr))) "\) \\f \"%lu" (itoa Units) "%pr" (itoa Prec) "\">%"))))) (princ))1 point