Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. eah trying to make a gif and keep messing up. ended up making an undo. Was thinking that as well. would have to tinker with it for a bit. ended up adding an [U]ndo and [C]lose option. *can only use undo on last leg.
  3. @mhupp great code no reason why input could not be 7.7;-12;22.8;12;-5.9;21.6;-0.5;\3.5;8;2.5;\1.5;13.8 in this case each leg is separated by a semi colon, or more often a comma is used. Could type in say notepad and copy and paste to a getstring. The reason for the paste rather than type direct would be if made a mistake you UNDO fix in notepad and do again. Use "parse to list" defun. @Ataim what do you think about that idea ?
  4. Today
  5. Should get you what your looking for. PolyHouse.lsp
  6. Nothing in the March issue I could find or anywhere on their website. Guess the decision wasn't meant to be up for discussion.
  7. Thanks to all that have pitched in. As per suggested here is a couple of screen shots to help. First is the sketch the guys measure in the field. Second is our dwg. What I'm needing is just the 10-key in the distances. Currently we turn ortho on and just move the cursor the direct we want and the type the distance (same as Stefan). Which works, but you have to take your hand off of the keyboard. What I'd like to do is to keep my hand on the 10-key and just type distances. For the following picture (starting at the arrow/donut) I would start the lisp, pick a point, and then the direction with the cursor and then distance 7.7. my next key strokes would simply be: -12 (left 90° turn); 22.8 (right 90° turn); 12 (right 90° turn); -5.9 (left 90° turn); 21.6 (right 90° turn); -0.5 (left 90° turn); \3.5(left 45° turn); 8 (right 90° turn); 2.5 (right 90° turn); \1.5 (left 45° turn); 13.8 (left 90° turn); etc.
  8. That was sudden, but I must admit I didn't read the last newsletter I received from them since I have been so busy with other things lately. Was there any heads-up in the newsletter?
  9. If I understand correctly your request, I think you can get the same with the right settings. Just aim the desired direction and specify the distance.
  10. Yesterday
  11. @Ataim you need to post a sample dwg showing a before and after. For others I think that this is what has been described this is just one option, draw house shape, set control offset from a boundary and move shape, then SLIDE option set desired offset from another boundary and move house but maintain 1st offset from boundary. As I said the 1990's software had various options. House shape could be very complex not just a rectang.
  12. Try this as a first pass, see if I have the idea right: Not quite as described and only draws lines as it is, rather than Polylines, but it being a Sunday and the CAD should be off it will do for a start, or if it inspires anyone tonight. To consider later: Fixing the loop - as it is just escape out of the LISP to end or join last point to start point. Join the lines together as Polylines (See Lee Mac PLJoin?) (defun c:testthis ( / Pta Ptb Pt1 Pt2 MyLine MyDistance MyAngle ed RefLine RefAngle ) (defun LM:roundm ( n m ) ;; Lee Mac ;; Round to nearest m (* m (fix ((if (minusp n) - +) (/ n (float m)) 0.5))) ) (command "line" pause pause "") ; Draw first segment (setq RefLine (entlast)) ; Line entitity name (setq Pta (setq Pt1 (cdr (assoc 10 (entget RefLine)))) ) ; First line start point (setq Ptb (setq Pt2 (cdr (assoc 11 (entget RefLine)))) ) ; first line end point (setq RefAngle (angle Pt1 Pt2) ) ; First line absolute angle (setq endloop "No") ; marker to keep loop going (while ; While loop (and (= endloop "No") ; Marker still 'no' (= (command "line" Pt2 pause "") nil) ; and user draws a line ) ; end and (setq ed (entget (entlast))) ; next segment entity name (setq Pt1 (cdr (assoc 10 ed))) ; next segment start point (also last one end point (Setq Pt1 Pt2) should also work (setq Pt2 (cdr (assoc 11 ed))) ; next segment end point (if (equal Pt2 Pta) ; If next segment end point = first segment start point (progn (princ "Closed Polyline") (setq Endloop "Yes") ; set end loop marker & end loop ) ; end progn (progn ; else (setq MyDistance (distance Pt1 Pt2)) ; Record next segment distance (setq MyAngle (LM:roundm (- (angle Pt1 Pt2) RefAngle) (/ pi 4) )) ; next segment angle relative to first segment, rounded to pi/4 (45 degrees) ; pi/4: 45 degree angles, pi/12 for 15 degrees (setq Pt2 (polar Pt1 (+ MyAngle RefAngle) MyDistance)) ; Calculate new PT from rounded angle (setq ed (subst (cons 11 Pt2) (assoc 11 ed) ed )) ; Modify the segment to perpendicular / 45 degree (entmod ed) ; update next segment ) ; end progn ) ; end if ) ; end loop (princ) ) ; end defun
  13. I use this Lee Mac lisp. I find it very useful. It's not exactly what you're asking for, but it might be a big help. https://www.lee-mac.com/3pointrectangle.html
  14. look into dynamic blocks
  15. Last week
  16. I've always set Plot layout for plotting for that reason and set Plot to Center as well so if a plotter with different margins was used it would still plot exactly the same way.
  17. No idea, it was up and running a day or two before. No explanation other than "If you have any questions, please contact AUGI."
  18. Many years ago "Civilcad" software had that function, draw a shape and click on boundaries you could do things like set a side and slide along that side with updating offset to other sides as one option. So understand what you want but no solution, sorry. Not sure if it ended up in current software "Magnet". Note in the image the offset line to the angled line., it will always be the closest corner and changes automatically depending on the shape. Welcome to Cadtutor. Post a sample dwg with some examples of what your looking for, a before and after is best.
  19. Do you remember what the command was to run the LISP - you never know, someone might have a copy or a link to it
  20. Really? Was an explanation offered as to why?
  21. The AUGI Forums are Now Archived We have archived the AUGI Forums by making them read-only for reference purposes. No new topics or comments will be allowed going forward from March 2026. If you have any questions, please contact AUGI. Just letting you know there may be a lot more new traffic here. Unfortunately no way to let any of their users know. https://forums.augi.com/search.php?searchid=3102365
  22. I moved your thread to the AutoLISP, Visual LISP & DCL Forum.
  23. I'm a land surveyor. Years ago I worked at a company that had a script or lisp to draw a house. Basically you started a polyline and then drug the cursor the direction you wanted to go. Then you would put in the distance. Then you simply type the next distance and would draw that distance 90° to the right of the last line. Or if you put a - in front of the distance it would draw 90° to the left of the last line. Or you could add / or \ to draw 45° to the last line. You would continue until you are done. I would be willing to pay $$$$ if someone could write this for me.
  24. Perhaps it will suit you. Polyline Dimension by marko_ribar (defun c:pdim ( / ListClockwise-p ch plSet pLlst vLst oldOsn cAng cDis cPt ) ;;; Polyline Dimension by marko_ribar ;;;https://www.cadtutor.net/forum/topic/54351-automatic-distance-between-polygon-vertices/#comment-451128 ;;; posted https://forum.dwg.ru/forumdisplay.php?f=13 (vl-load-com) (defun ListClockwise-p ( lst / z vlst ) (vl-catch-all-apply 'minusp (list (if (not (equal 0.0 (setq z (apply '+ (mapcar (function (lambda (u v) (- (* (car u) (cadr v)) (* (car v) (cadr u))) ) ) (setq vlst (mapcar (function (lambda (a b) (mapcar '- b a)) ) (mapcar (function (lambda (x) (car lst))) lst) (cdr (reverse (cons (car lst) (reverse lst)))) ) ) (cdr (reverse (cons (car vlst) (reverse vlst)))) ) ) ) 1e-6 ) ) z (progn (prompt "\n\nChecked vectors are colinear - unable to determine clockwise-p of list") nil ) ) ) ) ) (initget 1 "Outside Inside") (setq ch (getkword "\nChoose on which side to put dimensions [Outside/Inside] : ")) (princ "\n<<< Select LwPolyline(s) for dimensioning >>> ") (if (setq plSet (ssget '((0 . "LWPOLYLINE")))) (progn (setq pLlst (vl-remove-if 'listp (mapcar 'cadr(ssnamex plSet))) oldOsn (getvar "OSMODE") ); end setq (setvar "OSMODE" 0) (setvar "CMDECHO" 0) (command "_.undo" "_be") (foreach pl pLlst (setq vLst (mapcar '(lambda( x ) (trans x 0 1)) (mapcar 'cdr (vl-remove-if-not '(lambda( x ) (= 10 (car x))) (entget pl) ) ) ) ); end setq (if (equal (logand (cdr (assoc 70 (entget pl))) 1) 1) (setq vLst (append vLst (list (car vLst)))) ); end if (if (not (ListClockwise-p vLst)) (setq vLst (reverse vLst))) (while (< 1 (length vLst)) (setq cAng (angle (car vLst) (cadr vLst)) cDis (/ (distance (car vLst) (cadr vLst)) 2.0) ) ;_ (if (>= (caar vLst) (caadr vLst)) ;_ (setq cAng (- cAng pi)) ;_ ); end if (if (eq ch "Inside") (setq cPt (polar (polar (car vLst) cAng cDis) (- cAng (* 0.5 pi)) (* 2.5 (getvar "DIMTXT")))); end setq (setq cPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 2.5 (getvar "DIMTXT")))); end setq ); end if (command "_.dimaligned" (car vLst) (cadr vLst) cPt) (setq vLst (cdr vLst)) ); end while ); end foreach (command "_.undo" "_e") (setvar "OSMODE" oldOsn) (setvar "CMDECHO" 1) ); end progn ); end if (princ) )
  25. Once I made your MText large enough it was very visible. Try placing the MText in PaperSpace.
  26. Another way to approach this ";; Loop through vertices" is to get all the vertices and simply use those XY values of the corresponding two points in a repeat. You can check the readabilty of the answer by looking at the angle of the two points, so place answer above or below. There are plenty of label plines out there do a google, "Kent Cooper" has some good ones. may be faster than debugging what you have. setq plent (entsel "\nPick pline")) (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))) (princ co-ord)
  27. This question has been asked before. Do a google or search here. I remember posting something.
  28. In the future please place your code in Code Tags. (<> in the editor toolbar)
  29. Ok. Guess they changed it.
  1. Load more activity
×
×
  • Create New...