Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/30/2023 in all areas

  1. Steven P "for tables, my preference is still do them with lines and text", making tables is easy once you understand a few things like setting up a table style before making the table, you can override most settings in a table I use stuff like find longest string in a list so can set width of a table column, the alignments can be changed for text inside like MC, its a bit like dimensions it has so many variables, easiest way is make a table style at start as part of make a table. A block can be added to a table cell. Ok one little hiccup I have done big big tables and they can take forever to addrows, but there is a solution if you know its big you set the regen of table off then turn on when finished its almost instant then. Here is one example and some get & put examples for a table. Tables various settings.lsp list of methods for a table.txt I have some other examples as well PM me if you want.
    1 point
  2. Why not this simple (defun c:ptperp ( / e p1 p2 ) (vl-load-com) (if (and (setq e (car (nentsel "\nPick entity to draw perpendicular line to..."))) (setq p1 (trans (getpoint "\nPick or specify point to draw perpendicular line from : ") 1 0)) (not (vl-catch-all-error-p (vl-catch-all-apply (function vlax-curve-getstartpoint) (list e)))) ) (progn (setq p2 (vlax-curve-getclosestpointto e p1 t)) (entmake (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2) (cons 62 3) ) ) ) ) (princ) )
    1 point
  3. (defun c:Test (/ int sel ent get ) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (princ "\nSelect blocks to replace them with point objects : ") (setq int -1 sel (ssget "_:L" '((0 . "INSERT")))) (while (setq int (1+ int) ent (ssname sel int)) (and (setq get (entget ent)) (entmake (list '(0 . "POINT") (assoc 10 get) (assoc 8 get))) (entdel ent) ) ) ) (princ) )
    1 point
  4. Are you after replacing blocks with point objects ?
    1 point
  5. Hello everyone, sorry for my late reply, some personal problems that prevented me from being active. Thank you for the information, I understand then that I did not find if the majority do the periphery of their room. Thanks for the code, I will try to add it in Steve's code, if I can't, I will come back to you.
    1 point
  6. I changed it a bit. I use (vla-move instead of (vlax-invoke e 'move I hope you don't mind. I'm not sure which you want, foo puts the point 1 unit up vertically foo2 puts the point 1 unit offset to the imaginary line p1-p2 I think you want foo2. Anyway, here's both. change the bottom line if needed to (c:foo2) ;; Ronjonp - 03.22.2018 mid pt of two pts (defun _mid (p1 p2) (polar p1 (angle p1 p2) (/ (distance p1 p2) 2.))) ; modified by Alan H basicly supports any object that can have a bounding box 03.23.2018 ;; raise a point by a certain amount, vertically (defun raise (p1 by / ) (list (nth 0 p1) (+ (nth 1 p1) by) ) ) ;; raise a point by a certain amount, vertically (defun offset_by (p1 ang by / ) (polar p1 (+ ang (/ pi 2.0)) by) ;; angle of p1-p2 + 90° ) (defun c:foo (/ e e_ p p1 p2 p3) (setq e (vlax-ename->vla-object (car (entsel "pick object")))) (vla-getboundingbox e 'll 'ur) (setq p (mapcar 'vlax-safearray->list (list ll ur))) (setq p1 (getpoint "pick 1st point")) (setq p2 (getpoint "pick 2nd point")) (setq p3(_mid p1 p2) ) ;; raise it by 1 unit (setq p3 (raise p3 1.0)) (vla-move e (vlax-3d-point (_mid (car p) (cadr p))) (vlax-3d-point p3)) (princ) ) (defun c:foo2 (/ e e_ p p1 p2 p3) (setq e (vlax-ename->vla-object (car (entsel "pick object")))) (vla-getboundingbox e 'll 'ur) (setq p (mapcar 'vlax-safearray->list (list ll ur))) (setq p1 (getpoint "pick 1st point")) (setq p2 (getpoint "pick 2nd point")) (setq p3(_mid p1 p2) ) ;; offset it by 1 unit (setq p3 (offset_by p3 (angle p1 p2) 1.0)) (vla-move e (vlax-3d-point (_mid (car p) (cadr p))) (vlax-3d-point p3)) (princ) ) (vl-load-com) (c:foo)
    1 point
  7. It works both ways for me, with a 'c:' and without it, AutoDesk help shows it both ways.
    1 point
  8. We just had different pick plot button, but also had layouts only, pick button and watch sheets come out.
    1 point
×
×
  • Create New...