Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/03/2024 in all areas

  1. At first I didn't see that you had your lisps posted, so I made this version of mine, with most of it plain lisp ;;; Enclose Texts with Round(), Square[], Curly{}, sTraight||, Forward//, Backward\\ ;;; Isaac A 20240203 (vl-load-com) (defun c:ent (/ a b c d dw e f g o oe) (setq oe (getvar 'cmdecho) o (getvar 'osmode) ) (setvar 'cmdecho 0) (vla-startundomark (setq dw (vla-get-activedocument (vlax-get-acad-object)))) (setvar 'osmode 0) (princ "\nSelect the texts.") (if (setq a (ssget (list (cons 0 "TEXT,MTEXT")))) (progn (initget "Round Square Curly sTraight Forward Backward") (setq b 0 c (sslength a) d (getkword "Round(), Square[], Curly{}, sTraight||, Forward//, Backward\\\\ <R>: ") ) (while (< b c) (setq e (entget (ssname a b)) f (cdr (setq g (assoc 1 e))) ) (cond ((= d "Round") (setq f (strcat "("f")"))) ((= d "Square") (setq f (strcat "["f"]"))) ((= d "Curly") (setq f (strcat "{"f"}"))) ((= d "sTraight") (setq f (strcat "|"f"|"))) ((= d "Forward") (setq f (strcat "/"f"/"))) ((= d "Backward") (setq f (strcat "\\"f"\\"))) (T (setq f (strcat "("f")"))) ) (setq e (subst (cons 1 f) g e)) (entmod e) (setq b (1+ b)) ) ) (princ "\nNo texts selected") ) (setvar 'cmdecho oe) (setvar 'osmode o) (vla-endundomark dw) (princ) )
    1 point
  2. An image pop menu example using same method as Pkenewell has suggested. Used for years. **PIPES [PIPES] [COGGSLD(SD201,SUBSOIL)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG201") [COGGSLD(SD202,FLUSHOUT)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG202") [COGGSLD(SD203,CATCH)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG203") [COGGSLD(SD204,HOUSE)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG204") [COGGSLD(SD205,STREET)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG205") [COGGSLD(SD206,EASEMENT)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG206") [COGGSLD(SD207,ANCHOR)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/CGG207")
    1 point
  3. There are several solutions to what you ask. For your construction keep in mnd the following: To find the center of a circle of a given radius that is tangent to a line create a line parallel to the line on both sides at a distance equal to the cicle's radius. To find the center of a circle of radius R1 that is tangent to a circle of radius R2 with a known location, create two circles concentric with R2. The radii of these two circles are (R1 + R2) and (R1 - R2). To find the center of a circle that is tangent to a line AND tangent to a circle use the intersections of the lines and circles from the previous two constructions. For your task create the white 2100 circle first. The center of the 2700 circle is at the intersection of a line passing through the 2100 and blues circles with either the 2670 or 2730 circles.
    1 point
  4. I think you will have to use Parametric constraints. You know, by offsetting the 30R circle, a circle on which the centre of the R2690 circle lies, and you know, by offsetting the 3° line, a line on which the centre of the R2100 lies. You know the distance between the two circles and you know the point of contraflexure (point B) is 90 from the base line. Set up the constraints as needed and you will get the centres of the two circles. I don't have parametric constraints on my version of AutoCAD, but as it came since AutoCAD 2010, you have all the tools to hand. I have to do it by trial and error.
    1 point
  5. @ThomasSkye what you've drawn is commonly consider an oblique projection where one side of a 3D object is drawn head-on and undistorted while other sides of the object are drawn at a constant angle. The scaling in the third dimension may be the same as the front side (Cavalier projection) or may be foreshortened (Cabinet projection). To properly scale lines on planes not parallel to the front plane it is necessary to determine the x, y, z' components of the lines where the z' axis is the oblique angle you have chosen (roughly 20° in your drawing). Check here for more info on oblique projections.
    1 point
  6. The easiest option is probably to change your UCS to match the wall. If you're using an isometric view, though, it gets a little tricky. In other words, you're trying to draw a surface, such as this wall, to look the way it would if you're not seeing it directly from the front. Perspective gets involved, so it's not possible to draw everything to the exact scale. The typical workaround is to draw horizontal lines at 30 degrees offset from normal, while keeping the vertical lines vertical. You can keep the distances the same. If that doesn't work out, please provide more information about what you're trying to do. Welcome to the forum.
    1 point
  7. Your code here is just creating a square for every hatch... ; Step 5: Create a new associative polyline boundary (setq newboundary (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(8 . "0") '(100 . "AcDbPolyline") '(90 . 4) '(10 0 0) '(10 10 0) '(10 10 10) '(10 0 10) '(10 0 0) ) ) )
    1 point
  8. You need to post a drawing.
    1 point
  9. Maybe HatchB an oldy but a good one. HatchB.lsp
    1 point
  10. You can obtain the objects constituting the hatch boundary from the DXF group 330 entries which follow DXF group 97 (which itself indicates the number of boundary entities) in the DXF data list, e.g.: (defun c:selhatbound ( / bnd ent enx ) (while (progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect hatch: "))) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again.") ) ( (null ent) nil ) ( (/= "HATCH" (cdr (assoc 0 (setq enx (entget ent))))) (princ "\nThe selected object is not a hatch.") ) ( (zerop (cdr (assoc 97 enx))) (princ "\nThe selected hatch has no associated boundary objects.") ) ( (progn (setq bnd (ssadd)) (foreach itm (member (assoc 97 enx) enx) (if (= 330 (car itm)) (ssadd (cdr itm) bnd) ) ) (zerop (sslength bnd)) ) (prompt "\nUnable to select boundary objects.") ) ( (sssetfirst nil bnd) nil ) ) ) ) (princ) )
    1 point
  11. I have NO idea how it worked previously as I despise all things Apple. But as there IS indeed a specific article about it on Autodesk's site, I'm assuming the following is not what you're used to. So try this? https://help.autodesk.com/view/ACDMAC/2024/ENU/?guid=GUID-9E737D61-58ED-4FB0-8E54-1B692D925637
    1 point
×
×
  • Create New...