<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic 3d poly elevation as label in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133321#M46167</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need tool to amend 3d poly with elevation (3 digits 0.001) written on same layer, align with poly and moved from poly for 0.05 units&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found tool to do that, but it creates elevation on poly without moving from poly and I need to do it manually thousands of those&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 19:32:48 GMT</pubDate>
    <dc:creator>BB8x</dc:creator>
    <dc:date>2022-04-27T19:32:48Z</dc:date>
    <item>
      <title>3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133321#M46167</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need tool to amend 3d poly with elevation (3 digits 0.001) written on same layer, align with poly and moved from poly for 0.05 units&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found tool to do that, but it creates elevation on poly without moving from poly and I need to do it manually thousands of those&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 19:32:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133321#M46167</guid>
      <dc:creator>BB8x</dc:creator>
      <dc:date>2022-04-27T19:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133345#M46168</link>
      <description>&lt;P&gt;This is what I use from Alan Thompson. It creates an mtext field with a mask so you don't have to move it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 19:49:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133345#M46168</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-04-27T19:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133393#M46169</link>
      <description>&lt;P&gt;Do not know how to use it tbh. Keep asking&amp;nbsp;Specify next point [Undo]&lt;/P&gt;&lt;P&gt;I was imaging this as selecting all 3dpolies (like 550 of them) on the drawing and hit enter&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 20:10:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133393#M46169</guid>
      <dc:creator>BB8x</dc:creator>
      <dc:date>2022-04-27T20:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133397#M46170</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8449010"&gt;@BB8x&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a fence selection. Where it intersects the polylines it will place the label.&lt;/P&gt;
&lt;P&gt;It could easily be modified to select all and place on the midpoint or something.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 20:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133397#M46170</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-04-27T20:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133439#M46171</link>
      <description>&lt;P&gt;I did not mention before, but I need vertexes only please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 20:27:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133439#M46171</guid>
      <dc:creator>BB8x</dc:creator>
      <dc:date>2022-04-27T20:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133826#M46172</link>
      <description>&lt;P&gt;Alternatively need tool to move text for 0.05 "up"&lt;/P&gt;&lt;P&gt;Left-right direction is direction of texts. Lets say text has rotation 177 deg, so up is 177deg-90deg&lt;/P&gt;&lt;P&gt;Sample attached&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 00:14:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11133826#M46172</guid>
      <dc:creator>BB8x</dc:creator>
      <dc:date>2022-04-28T00:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135326#M46173</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8449010"&gt;@BB8x&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this code&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:mtx( / s en enp)
  (setq s(ssget "_A" '((0 . "*text"))))
  (repeat (setq i(sslength s))
    (setq en(entget(ssname s (setq i(1- i))))
     enp(assoc 10 en))
    (setq en(entmod(subst (cons 10 (mapcar '+ (cdr enp) '(0. 0.1 0.))) enp en)))
    )
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 13:50:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135326#M46173</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2022-04-28T13:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135433#M46174</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8449010"&gt;@BB8x&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give this a try. It's not to cleanup the mess but to do the job right in the first place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:foo (/ a n l p s)
  ;; RJP » 2022-04-28
  ;; Make Readable  -  Lee Mac
  ;; Returns a given angle corrected for text readability
  (defun lm:makereadable (a)
    ((lambda (a)
       (if (and (&amp;lt; (* pi 0.5) a) (&amp;lt;= a (* pi 1.5)))
	 (+ a pi)
	 a
       )
     )
      (rem (+ a pi pi) (+ pi pi))
    )
  )
  (if (setq s (ssget '((0 . "POLYLINE"))))
    (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
      (setq n -1)
      (setq l (assoc 8 (entget e)))
      (repeat (1+ (fix (vlax-curve-getendparam e)))
	(setq p (vlax-curve-getpointatparam e (setq n (1+ n))))
	(setq a (lm:makereadable (angle '(0 0) (vlax-curve-getfirstderiv e n))))
	(entmake (list '(0 . "TEXT")
		       '(100 . "AcDbEntity")
		       l
		       '(100 . "AcDbText")
		       (cons 10 (polar p (+ a (/ pi 2)) 0.05))
		       '(40 . 0.18)
		       (cons 1 (vl-string-subst "," "." (rtos (last p) 2 3)))
		       (cons 50 a)
		       '(41 . 1.)
		       '(51 . 0.)
		       '(7 . "Standard")
		       '(71 . 0)
		       '(72 . 0)
		       (cons 11 (list 0. 0. (last p)))
		       '(100 . "AcDbText")
		       '(73 . 0)
		 )
	)
      )
    )
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 14:31:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135433#M46174</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-04-28T14:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: 3d poly elevation as label</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135478#M46175</link>
      <description>&lt;P&gt;Try this ?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:label_Z_vertex ( / js AcDoc Space n ent pr pt_start deriv rtx nw_obj)
  (princ "\nSelect polylines.")
  (while
    (null
      (setq js
        (ssget
          '(
            (0 . "*POLYLINE")
            (-4 . "&amp;lt;NOT")
              (-4 . "&amp;amp;") (70 . 112)
            (-4 . "NOT&amp;gt;")
          )
        )
      )
    )
    (princ "\nSelect is empty, or isn't POLYLINE!")
  )
  (setq
    AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))
    Space
    (if (= 1 (getvar "CVPORT"))
      (vla-get-PaperSpace AcDoc)
      (vla-get-ModelSpace AcDoc)
    )
  )
  (repeat (setq n (sslength js))
    (setq
      ent (ssname js (setq n (1- n)))
      pr -1
    )
    (repeat (1+ (fix (vlax-curve-getEndParam ent)))
      (setq
        pt_start (vlax-curve-GetPointAtParam ent (setq pr (1+ pr)))
        deriv (vlax-curve-getFirstDeriv ent pr)
        rtx (- (atan (cadr deriv) (car deriv)) (angle '(0 0 0) (getvar "UCSXDIR")))
      )
      (if (or (&amp;gt; rtx (* pi 0.5)) (&amp;lt; rtx (- (* pi 0.5)))) (setq rtx (+ rtx pi)))
      (setq nw_obj
        (vla-addMtext Space
          (vlax-3d-point (polar pt_start (+ rtx (* pi 0.5)) 0.15))
          0.0
          (rtos (caddr pt_start) 2 3)
        )
      )
      (mapcar
        '(lambda (pr val)
          (vlax-put nw_obj pr val)
        )
        (list 'AttachmentPoint 'Height 'DrawingDirection 'InsertionPoint 'StyleName 'Layer 'Rotation 'BackgroundFill)
        (list 7 (getvar "TEXTSIZE") 5 (polar pt_start (+ rtx (* pi 0.5)) 0.15) "Standard" (getvar "CLAYER") rtx -1)
      )
    )
  )
  (prin1)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 14:33:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-poly-elevation-as-label/m-p/11135478#M46175</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2022-04-28T14:33:51Z</dc:date>
    </item>
  </channel>
</rss>

