Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/2024 in all areas

  1. you mean texts with numbers? Try this, one "#" is for one number (ssget '((0 . "MTEXT")(1 . "#,##,###")))
    1 point
  2. Try this ; Put number at 1/2 internal angle ; By AlanH May 2024 (defun c:labmid ( / oldsnap dist p1 p2 p3 p4 ang1 ang2 ang3) (setq x 1) ;; Get Inside Angle - Lee Mac ;; Returns the smaller angle subtended by three points with vertex at p2 (defun LM:GetInsideAngle ( p1 p2 p3 ) ( (lambda ( a ) (min a (- (+ pi pi) a))) (rem (+ pi pi (- (angle p2 p1) (angle p2 p3))) (+ pi pi)) ) ) ; clockwise check by G Carlo (defun gc:clockwise-p ( p1 p2 p3 ) (< (sin (- (angle p1 p3) (angle p1 p2))) -1e-14)) (setq oldsnap (getvar 'osmode)) (setq dist (getreal "\nEnter radial distance from corner ")) (setvar 'osmode 35) (while (setq p1 (getpoint "\nPick 1st point away from intersection Enter to exit ")) (setvar 'osmode 32) (setq p2 (getpoint "\nPick point at intersection ")) (setvar 'osmode 35) (setq p3 (getpoint "\nPick 3rd point away from intersection ")) (setq ang3 (/ (LM:GetInsideAngle p1 p2 p3 ) 2.0)) (setq ang1 (angle p1 p2)) (if (gc:clockwise-p p1 p2 p3 ) (setq p4 (polar p2 (+ ang1 ang3 pi) dist)) (setq p4 (polar p2 (- ang1 ang3 pi) dist)) ) (setvar 'osmode 0) (command "text" p4 1.0 0.0 (rtos X 2 0)) (setq x (1+ x)) (setvar 'osmode 35) ) (setvar 'osmode oldsnap) (princ) ) (c:labmid)
    1 point
  3. A good tutorial and description about using XDATA. https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php
    1 point
  4. There aren't really many applications in which you would use xdata. I can only imagine needing one when you create your own applications like you would with a dictionary, in which you would like the objects to behave and "react" differently in respond to several commands. Again, what do I know... Here is one example of one of my programs in which xdata is used. (I hardly ever use this because I hardly see its use, but I just created it as practice for myself. Hence, I stopped enhancing it.) Edit: Apologies for the complex example, I didn't read the OP that it was intended to be simple... ObjectPropertySync.lsp
    1 point
×
×
  • Create New...