<?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 Re: Pline Dimensioning in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4870932#M151650</link>
    <description>&lt;P&gt;WOW! This works perfectly for what I need.&lt;/P&gt;&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Mar 2014 15:31:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-03-07T15:31:25Z</dc:date>
    <item>
      <title>Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549734#M151631</link>
      <description>Does anyone have a lisp to place aligned dimensions on each segment of a polyline?&lt;BR /&gt;
&lt;BR /&gt;
I would use it for reinforcing bar detailing. &lt;BR /&gt;
Thanks for any other suggestion.&lt;BR /&gt;
&lt;BR /&gt;
Matthew</description>
      <pubDate>Mon, 06 Feb 2006 21:25:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549734#M151631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T21:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549735#M151632</link>
      <description>Ask Luis E.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MATTW&gt; wrote in message news:5078769@discussion.autodesk.com...&lt;BR /&gt;
Does anyone have a lisp to place aligned dimensions on each segment of a &lt;BR /&gt;
polyline?&lt;BR /&gt;
&lt;BR /&gt;
I would use it for reinforcing bar detailing.&lt;BR /&gt;
Thanks for any other suggestion.&lt;BR /&gt;
&lt;BR /&gt;
Matthew&lt;/MATTW&gt;</description>
      <pubDate>Mon, 06 Feb 2006 21:34:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549735#M151632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T21:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549736#M151633</link>
      <description>where I can find him? which forum?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Matthew</description>
      <pubDate>Mon, 06 Feb 2006 21:44:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549736#M151633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T21:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549737#M151634</link>
      <description>Hi Matthew&lt;BR /&gt;
&lt;BR /&gt;
Try this one:&lt;BR /&gt;
&lt;BR /&gt;
;; Program draw a dimension of all polygon segments&lt;BR /&gt;
;; Polygon must be closed or opened&lt;BR /&gt;
;; copyrights (c) 2005 Fatty T.O.H. all rights removed&lt;BR /&gt;
;; A2005 / Windows XP&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
;; helper functions : written by Fatty T.O.H.&lt;BR /&gt;
&lt;BR /&gt;
;; ***  group list   ***&lt;BR /&gt;
&lt;BR /&gt;
(defun group-by-num (lst num / ls ret)&lt;BR /&gt;
  (if (= (rem (length lst) num ) 0)&lt;BR /&gt;
    (progn&lt;BR /&gt;
      (setq ls nil)&lt;BR /&gt;
      (repeat (/ (length lst) num)&lt;BR /&gt;
	(repeat num (setq ls &lt;BR /&gt;
		    (cons (car lst) ls)&lt;BR /&gt;
	      lst (cdr lst)))&lt;BR /&gt;
	(setq ret (append ret (list (reverse ls)))&lt;BR /&gt;
	      ls nil)))&lt;BR /&gt;
    )&lt;BR /&gt;
ret&lt;BR /&gt;
  )&lt;BR /&gt;
&lt;BR /&gt;
;; ***  coordinates  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun get-vexs (pline_obj / verts)&lt;BR /&gt;
      (setq verts (vlax-get pline_obj 'Coordinates)&lt;BR /&gt;
	    verts&lt;BR /&gt;
		  (cond&lt;BR /&gt;
		    ((wcmatch (vlax-get pline_obj 'Objectname )&lt;BR /&gt;
			     "AcDb2dPolyline,AcDb3dPolyline") &lt;BR /&gt;
		     (group-by-num verts 3)&lt;BR /&gt;
		    )&lt;BR /&gt;
		    ((eq (vlax-get pline_obj 'Objectname )&lt;BR /&gt;
			     "AcDbPolyline") &lt;BR /&gt;
		     (group-by-num verts 2)&lt;BR /&gt;
		    )&lt;BR /&gt;
		    (T nil)&lt;BR /&gt;
		  )&lt;BR /&gt;
)&lt;BR /&gt;
  ) &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
;; ***  inclined angle  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun dif-angle (ang1 ang2 / def)&lt;BR /&gt;
  (set 'ang1&lt;BR /&gt;
       (if (&amp;gt; ang2 (+ pi ang1))&lt;BR /&gt;
	 (+ (* pi 2) ang1)&lt;BR /&gt;
	 ang1&lt;BR /&gt;
       )&lt;BR /&gt;
  )&lt;BR /&gt;
  (set 'ang2&lt;BR /&gt;
       (if (&amp;gt; ang1 (+ pi ang2))&lt;BR /&gt;
	 (+ (* pi 2) ang2)&lt;BR /&gt;
	 ang2&lt;BR /&gt;
       )&lt;BR /&gt;
  )&lt;BR /&gt;
  (setq def (- ang2 ang1))&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
;; ***  test on CW/CCW  ***&lt;BR /&gt;
;; (angdir=0)&lt;BR /&gt;
(defun ccw-test	(pt_list / angle_list)&lt;BR /&gt;
  (setq	angle_list&lt;BR /&gt;
	 (mapcar (function (lambda (x y)&lt;BR /&gt;
			     (angle x y)&lt;BR /&gt;
			   )&lt;BR /&gt;
		 )&lt;BR /&gt;
		 pt_list&lt;BR /&gt;
		 (cdr pt_list)&lt;BR /&gt;
	 )&lt;BR /&gt;
  )&lt;BR /&gt;
  (if (&amp;gt; (apply	'+&lt;BR /&gt;
		(mapcar	(function (lambda (x y) (dif-angle x y)))&lt;BR /&gt;
			angle_list&lt;BR /&gt;
			(cdr angle_list)&lt;BR /&gt;
		)&lt;BR /&gt;
	 )&lt;BR /&gt;
	 0&lt;BR /&gt;
      )&lt;BR /&gt;
    t&lt;BR /&gt;
    nil&lt;BR /&gt;
  )&lt;BR /&gt;
)&lt;BR /&gt;
;; ***  main programm  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun C:dmp (/ acsp adoc cent_coords coords pl txt_coords)&lt;BR /&gt;
  (vl-load-com)&lt;BR /&gt;
  (setq adoc (vla-get-activedocument (vlax-get-acad-object)))&lt;BR /&gt;
  (setq acsp (vla-get-modelspace adoc))&lt;BR /&gt;
  (setq	pl (vlax-ename-&amp;gt;vla-object&lt;BR /&gt;
	     (car (entsel "\n &amp;gt;&amp;gt; Select pline &amp;gt;&amp;gt; \n"))&lt;BR /&gt;
	   )&lt;BR /&gt;
  )&lt;BR /&gt;
  &lt;BR /&gt;
  (setq	coords (get-vexs pl))&lt;BR /&gt;
  (if (eq :vlax-true (vla-get-closed pl))&lt;BR /&gt;
  (setq	coords (append coords (list (car coords)))))&lt;BR /&gt;
  (if (ccw-test coords)(setq dop pi)(setq dop 0)) &lt;BR /&gt;
  (setq	cent_coords&lt;BR /&gt;
	 (mapcar (function (lambda (x y)&lt;BR /&gt;
			     (mapcar '/ (mapcar '+ x y) '(2 2 2))&lt;BR /&gt;
			   )&lt;BR /&gt;
		 )&lt;BR /&gt;
		 coords&lt;BR /&gt;
		 (cdr coords)&lt;BR /&gt;
	 )&lt;BR /&gt;
  )&lt;BR /&gt;
  (setq	txt_coords&lt;BR /&gt;
	 (mapcar (function (lambda (x y z)&lt;BR /&gt;
			     (polar x (+ dop (angle y z) (/ pi 2)) 8.);change extline length&lt;BR /&gt;
			   )&lt;BR /&gt;
		 )&lt;BR /&gt;
		 cent_coords&lt;BR /&gt;
		 coords&lt;BR /&gt;
		 (cdr coords)&lt;BR /&gt;
	 )&lt;BR /&gt;
  )&lt;BR /&gt;
  (mapcar (function (lambda (x y z)&lt;BR /&gt;
		      (vla-adddimaligned acsp x y z)&lt;BR /&gt;
		    )&lt;BR /&gt;
	  )&lt;BR /&gt;
	  (mapcar 'vlax-3d-point coords)&lt;BR /&gt;
	  (mapcar 'vlax-3d-point (cdr coords))&lt;BR /&gt;
	  (mapcar 'vlax-3d-point txt_coords)&lt;BR /&gt;
  )&lt;BR /&gt;
  (princ)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
(prompt "\n\t***\tPLINE DIMENSIONING\t***\n")&lt;BR /&gt;
(prompt "\nType DMP to execute\n")&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Mon, 06 Feb 2006 21:47:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549737#M151634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T21:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549738#M151635</link>
      <description>Wow, thank you Fatty! nearly perfect...&lt;BR /&gt;
&lt;BR /&gt;
This is ok if I have straight line segments, but if I have a filleted pline?&lt;BR /&gt;
I think we should consider the bulge of each segment...</description>
      <pubDate>Mon, 06 Feb 2006 22:45:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549738#M151635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T22:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549739#M151636</link>
      <description>Lately I just look, what is going on here... I think I have one similar to&lt;BR /&gt;
what Fatty just did... If I found it, I'll post it here.&lt;BR /&gt;
&lt;BR /&gt;
Do you required to use dimension objects?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
http://www.geometricad.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MATTW&gt; wrote in message news:5078806@discussion.autodesk.com...&lt;BR /&gt;
where I can find him? which forum?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Matthew&lt;/MATTW&gt;</description>
      <pubDate>Mon, 06 Feb 2006 23:01:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549739#M151636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T23:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549740#M151637</link>
      <description>Hi Luis, here you are!&lt;BR /&gt;
&lt;BR /&gt;
As I posted before, that lisp was ok, but I would even like to dimension arc segments in a pline.&lt;BR /&gt;
Yes, I would like to use dim objects, no text objects.&lt;BR /&gt;
&lt;BR /&gt;
Here is an image of what I mean; the green texts are dimension objects on the magenta pline.</description>
      <pubDate>Mon, 06 Feb 2006 23:32:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549740#M151637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-06T23:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549741#M151638</link>
      <description>Sorry Matthew, &lt;BR /&gt;
but for the present I could't solve a problem&lt;BR /&gt;
with bulged segments, in this case I think, there is need&lt;BR /&gt;
to apply a method, same as to measurement of an arcs, if in the further I shall solve this problem, I shall return back to this thread&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Tue, 07 Feb 2006 08:46:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549741#M151638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T08:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549742#M151639</link>
      <description>No problem Fatty, many thanks for your help.&lt;BR /&gt;
I'll keep watch&lt;BR /&gt;
&lt;BR /&gt;
Matthew</description>
      <pubDate>Tue, 07 Feb 2006 11:20:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549742#M151639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T11:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549743#M151640</link>
      <description>Hi Matthew&lt;BR /&gt;
Try this but very quick and dirty,&lt;BR /&gt;
no time to varnish on it&lt;BR /&gt;
(partially grabbed from J. Menzi - bulge calculation)&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
;; Program draw a dimension of all polygon segments&lt;BR /&gt;
;; Polygon must be closed or opened&lt;BR /&gt;
;; copyrights (c) 2005 Fatty T.O.H. all rights removed&lt;BR /&gt;
;; A2005 / Windows XP&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
;; helper functions : written by Fatty T.O.H.&lt;BR /&gt;
&lt;BR /&gt;
;; ***  group list   ***&lt;BR /&gt;
&lt;BR /&gt;
(defun group-by-num (lst num / ls ret)&lt;BR /&gt;
  (if (= (rem (length lst) num ) 0)&lt;BR /&gt;
    (progn&lt;BR /&gt;
      (setq ls nil)&lt;BR /&gt;
      (repeat (/ (length lst) num)&lt;BR /&gt;
	(repeat num (setq ls &lt;BR /&gt;
		    (cons (car lst) ls)&lt;BR /&gt;
	      lst (cdr lst)))&lt;BR /&gt;
	(setq ret (append ret (list (reverse ls)))&lt;BR /&gt;
	      ls nil)))&lt;BR /&gt;
    )&lt;BR /&gt;
ret&lt;BR /&gt;
  )&lt;BR /&gt;
&lt;BR /&gt;
;; ***  coordinates  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun get-vexs (pline_obj / verts)&lt;BR /&gt;
      (setq verts (vlax-get pline_obj 'Coordinates)&lt;BR /&gt;
	    verts&lt;BR /&gt;
		  (cond&lt;BR /&gt;
		    ((wcmatch (vlax-get pline_obj 'Objectname )&lt;BR /&gt;
			     "AcDb2dPolyline,AcDb3dPolyline") &lt;BR /&gt;
		     (group-by-num verts 3)&lt;BR /&gt;
		    )&lt;BR /&gt;
		    ((eq (vlax-get pline_obj 'Objectname )&lt;BR /&gt;
			     "AcDbPolyline") &lt;BR /&gt;
		     (group-by-num verts 2)&lt;BR /&gt;
		    )&lt;BR /&gt;
		    (T nil)&lt;BR /&gt;
		  )&lt;BR /&gt;
)&lt;BR /&gt;
  ) &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
;; ***  inclined angle  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun dif-angle (ang1 ang2 / def)&lt;BR /&gt;
  (set 'ang1&lt;BR /&gt;
       (if (&amp;gt; ang2 (+ pi ang1))&lt;BR /&gt;
	 (+ (* pi 2) ang1)&lt;BR /&gt;
	 ang1&lt;BR /&gt;
       )&lt;BR /&gt;
  )&lt;BR /&gt;
  (set 'ang2&lt;BR /&gt;
       (if (&amp;gt; ang1 (+ pi ang2))&lt;BR /&gt;
	 (+ (* pi 2) ang2)&lt;BR /&gt;
	 ang2&lt;BR /&gt;
       )&lt;BR /&gt;
  )&lt;BR /&gt;
  (setq def (- ang2 ang1))&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
;; ***  test on CW/CCW  ***&lt;BR /&gt;
;; (angdir=0)&lt;BR /&gt;
(defun ccw-test	(pt_list / angle_list)&lt;BR /&gt;
  (setq	angle_list&lt;BR /&gt;
	 (mapcar (function (lambda (x y)&lt;BR /&gt;
			     (angle x y)&lt;BR /&gt;
			   )&lt;BR /&gt;
		 )&lt;BR /&gt;
		 pt_list&lt;BR /&gt;
		 (cdr pt_list)&lt;BR /&gt;
	 )&lt;BR /&gt;
  )&lt;BR /&gt;
  (if (&amp;gt; (apply	'+&lt;BR /&gt;
		(mapcar	(function (lambda (x y) (dif-angle x y)))&lt;BR /&gt;
			angle_list&lt;BR /&gt;
			(cdr angle_list)&lt;BR /&gt;
		)&lt;BR /&gt;
	 )&lt;BR /&gt;
	 0&lt;BR /&gt;
      )&lt;BR /&gt;
    t&lt;BR /&gt;
    nil&lt;BR /&gt;
  )&lt;BR /&gt;
)&lt;BR /&gt;
;; ***  main programm  ***&lt;BR /&gt;
&lt;BR /&gt;
(defun C:dmp (/ )&lt;BR /&gt;
  (vl-load-com)&lt;BR /&gt;
  (setq adoc (vla-get-activedocument (vlax-get-acad-object)))&lt;BR /&gt;
  (setq acsp (vla-get-modelspace adoc))&lt;BR /&gt;
  (setq	pl (vlax-ename-&amp;gt;vla-object&lt;BR /&gt;
	     (car (entsel "\n &amp;gt;&amp;gt; Select pline &amp;gt;&amp;gt; \n"))&lt;BR /&gt;
	   )&lt;BR /&gt;
  )&lt;BR /&gt;
&lt;BR /&gt;
(setq	coords (get-vexs pl))&lt;BR /&gt;
  (if (eq :vlax-true (vla-get-closed pl))&lt;BR /&gt;
  (setq	coords (append coords (list (car coords)))))&lt;BR /&gt;
  (if (ccw-test coords)(setq dop pi)(setq dop 0)) &lt;BR /&gt;
;;;  (setq	cent_coords&lt;BR /&gt;
;;;  (mapcar (function (lambda (x y)&lt;BR /&gt;
;;;			     (mapcar '/ (mapcar '+ x y) '(2 2 2))&lt;BR /&gt;
;;;			   )&lt;BR /&gt;
;;;		 )&lt;BR /&gt;
;;;		 coords&lt;BR /&gt;
;;;		 (cdr coords)&lt;BR /&gt;
;;;	 )&lt;BR /&gt;
;;;  )&lt;BR /&gt;
;;;  (setq	txt_coords&lt;BR /&gt;
;;;	 (mapcar (function (lambda (x y z)&lt;BR /&gt;
;;;			     (polar x (+ dop (angle y z) (/ pi 2)) 8.);change extline length&lt;BR /&gt;
;;;			   )&lt;BR /&gt;
;;;		 )&lt;BR /&gt;
;;;		 cent_coords&lt;BR /&gt;
;;;		 coords&lt;BR /&gt;
;;;		 (cdr coords)&lt;BR /&gt;
;;;	 )&lt;BR /&gt;
;;;  )&lt;BR /&gt;
(setq param_list (mapcar (function (lambda (x)&lt;BR /&gt;
		(fix (vlax-curve-getparamatpoint pl x))))&lt;BR /&gt;
      (mapcar (function (lambda (y)(trans y 0 1))) coords)))&lt;BR /&gt;
(mapcar (function (lambda (x y z)  &lt;BR /&gt;
(cond&lt;BR /&gt;
((not (zerop (setq blg (vla-getbulge pl x))))&lt;BR /&gt;
(progn&lt;BR /&gt;
(setq hgt (* 4 (atan (abs blg)))&lt;BR /&gt;
chord (distance y z)&lt;BR /&gt;
rad (abs (/ chord 2 (sin (/ hgt 2))))&lt;BR /&gt;
mid (trans (vlax-curve-getpointatparam pl (+ (fix x) 0.5)) 0 1)&lt;BR /&gt;
cen (trans (mapcar (function (lambda (a b)(/ (+ a b) 2))) y z) 0 1)&lt;BR /&gt;
txp (trans (polar mid (if (minusp blg)(angle cen mid)&lt;BR /&gt;
			(angle mid cen)) 8) 0 1)&lt;BR /&gt;
)&lt;BR /&gt;
(setq dm (vla-adddim3pointangular acsp&lt;BR /&gt;
	   (vlax-3d-point cen)&lt;BR /&gt;
	   (vlax-3d-point y)&lt;BR /&gt;
	   (vlax-3d-point z)&lt;BR /&gt;
	   (vlax-3d-point txp)))&lt;BR /&gt;
(vla-put-textoverride dm (rtos (abs (- (vlax-curve-getdistatpoint pl y)&lt;BR /&gt;
			       (vlax-curve-getdistatpoint pl z))) 2 2)))&lt;BR /&gt;
)&lt;BR /&gt;
(T (progn&lt;BR /&gt;
     (setq mid (trans (vlax-curve-getpointatparam pl (+ (fix x) 0.5)) 0 1))&lt;BR /&gt;
     (setq txp (trans (polar mid (+ dop (angle y z) (/ pi 2)) 8.) 0 1))&lt;BR /&gt;
     (vla-adddimaligned acsp &lt;BR /&gt;
	   (vlax-3d-point y)&lt;BR /&gt;
	   (vlax-3d-point z)&lt;BR /&gt;
	   (vlax-3d-point txp))&lt;BR /&gt;
     &lt;BR /&gt;
)&lt;BR /&gt;
))))&lt;BR /&gt;
param_list&lt;BR /&gt;
	coords&lt;BR /&gt;
	(cdr coords))&lt;BR /&gt;
	&lt;BR /&gt;
  (princ)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
(prompt "\n\t***\tPLINE DIMENSIONING\t***\n")&lt;BR /&gt;
(prompt "\nType DMP to execute\n")&lt;BR /&gt;
&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Tue, 07 Feb 2006 18:44:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549743#M151640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T18:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549744#M151641</link>
      <description>So good!&lt;BR /&gt;
I've slightly changed this line (where you find the center of the arched segment):&lt;BR /&gt;
cen (trans (mapcar (function (lambda (a b)(/ (+ a b) 2))) y z) 0 1)&lt;BR /&gt;
&lt;BR /&gt;
into this one:&lt;BR /&gt;
cen (trans (polar y (if (minusp blg)(-(angle y z)(-(/ pi 2)(/ hgt 2)))(+(angle y z)(-(/ pi 2)(/ hgt 2)))) rad) 0 1)&lt;BR /&gt;
&lt;BR /&gt;
In the attached image you can see the difference.&lt;BR /&gt;
So... problem resolved!&lt;BR /&gt;
Thank you, Fatty, you were so generous!&lt;BR /&gt;
&lt;BR /&gt;
Matthew</description>
      <pubDate>Tue, 07 Feb 2006 23:34:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549744#M151641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T23:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549745#M151642</link>
      <description>Good point, Matthew&lt;BR /&gt;
I think I need to work on further else&lt;BR /&gt;
to fix all of weak places in the routine&lt;BR /&gt;
&lt;BR /&gt;
Happy computing,&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 08 Feb 2006 06:58:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/1549745#M151642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-08T06:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/3397735#M151643</link>
      <description>&lt;P&gt;hii&amp;nbsp; thanx for great routin&amp;nbsp;&amp;nbsp;,&amp;nbsp;&amp;nbsp;&amp;nbsp; if we use this routin the last dimension value is not correct kindly update&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 20:07:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/3397735#M151643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-03T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855159#M151645</link>
      <description>&lt;P&gt;Hello Fatty,&lt;/P&gt;&lt;P&gt;I just came across this routine and I was wondering if you can make some modifications for me. I have very very limited understanding of AutoLisp and really no understanding of any other programming language.&lt;/P&gt;&lt;P&gt;I would like to use this routine to dimension a closed polyline and place the dimensions &lt;EM&gt;inside&lt;/EM&gt; the polyline. I use the height of the text as the distance to place the dimension. (i.e. if the text height is 1.5 then the dimension is placed 1.5 inside the polyline segment)&lt;/P&gt;&lt;P&gt;Also, is there a way to make the dimensions not associative. I can always just explode them so this isn't a big deal.&lt;/P&gt;&lt;P&gt;Any help you can give me is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 15:52:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855159#M151645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-04T15:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855397#M151646</link>
      <description>&lt;P&gt;[I haven't seen Fatty participating here recently (that routine is about 8 years old).&amp;nbsp; But there are various Polyline-dimensioning routines out there, such as &lt;A href="http://cadtips.cadalyst.com/create-dimension/dimension-polylines" target="_self"&gt;this one&lt;/A&gt;&amp;nbsp;and several related threads on these forums.&amp;nbsp; I may look at it later....]&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 17:02:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855397#M151646</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2014-03-04T17:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855449#M151647</link>
      <description>&lt;P&gt;Hi Kent,&lt;/P&gt;&lt;P&gt;I just tried the MDIM routine and it didn't work correctly. I did a bit of digging and found one called DPL but it didn't quite do what I want it to. This DMP routine seems the closest I have found I just need to figure out how to tweak it a little. Thanks so much for the heads-up. I will keep digging and see what else I can find.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 17:28:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4855449#M151647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-04T17:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4861640#M151648</link>
      <description>&lt;P&gt;Hi Kent,&lt;/P&gt;&lt;P&gt;I managed to get the DMP routine that Fatty wrote to do what I wanted it to do. There was a comment "change extline length" which made it simple, I just didn't see it right away.&lt;/P&gt;&lt;P&gt;What I want to know is, is there a way to make the extline length equal to negative the current text height? For example, if the current text height is 1.5, the extline length would be -1.5.&lt;/P&gt;&lt;P&gt;I am able to modify the routine based on what I need that value to be, but it would be nice if I didn't have to change it every time.&lt;/P&gt;&lt;P&gt;Thanks for any help you can give me.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 19:22:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4861640#M151648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-06T19:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4870652#M151649</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;is there a way to make the extline length equal to negative the current text height? For example, if the current text height is 1.5, the extline length would be -1.5.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Rather than using a &lt;EM&gt;negative distance&lt;/EM&gt;,&amp;nbsp;I would suggest&amp;nbsp;&lt;FONT color="#008000"&gt;subtracting&lt;/FONT&gt;&amp;nbsp;90 degrees from the local angle, rather than &lt;FONT color="#ff0000"&gt;adding&lt;/FONT&gt; it.&amp;nbsp; Try changing this:&lt;/P&gt;
&lt;P&gt;(polar x (&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;+&lt;/FONT&gt;&lt;/STRONG&gt; dop (angle y z) (/ pi 2)) &lt;FONT color="#ff0000"&gt;8.&lt;/FONT&gt;);change extline length&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(polar x (&lt;FONT size="3" color="#008000"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/FONT&gt; dop (angle y z) (/ pi 2)) &lt;FONT color="#008000"&gt;&lt;STRONG&gt;(* (getvar 'dimscale) (getvar 'dimtxt))&lt;/STRONG&gt;&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That assumes the text style assigned to the current Dimension Style is &lt;EM&gt;not&lt;/EM&gt; of fixed height.&amp;nbsp; If it is, that will determine the height, rather than the combination of the dimension style's text height and the dimension-scale variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried DMP [with&amp;nbsp;that new&amp;nbsp;distance determination, and m_ibis's correction for arc segments], and found it inconsistent about both inside-out-side-ness and, at least along some non-orthogonal line segments, distance from segment to dimension.&amp;nbsp; I'm playing around with a different approach, which I'll post if it works out.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 13:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4870652#M151649</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2014-03-07T13:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4870932#M151650</link>
      <description>&lt;P&gt;WOW! This works perfectly for what I need.&lt;/P&gt;&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:31:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4870932#M151650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-07T15:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pline Dimensioning</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4871164#M151651</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;....&amp;nbsp;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I tried DMP [with&amp;nbsp;that new&amp;nbsp;distance determination, and m_ibis's correction for arc segments], and found it inconsistent about both inside-out-side-ness and, at least along some non-orthogonal line segments, distance from segment to dimension.&amp;nbsp; I'm playing around with a different approach, which I'll post if it works out.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;I also found that if the closing segment of a closed Polyline is an &lt;EM&gt;arc&lt;/EM&gt; segment, DMP gives the &lt;EM&gt;wrong length&lt;/EM&gt; for it [because of the way it gets the length, the result is that of the entire Polyline &lt;EM&gt;minus&lt;/EM&gt; that last segment, rather than the that of the closing segment].&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Attached is my approach, &lt;STRONG&gt;DimPolyInside.lsp&lt;/STRONG&gt; with its &lt;STRONG&gt;DPI&lt;/STRONG&gt; command, which overcomes the problems mentioned, and has some other tweaks.&amp;nbsp; Be sure to put in the right Layer name, and consider some of the other suggestions in comments.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 17:26:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/m-p/4871164#M151651</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2014-03-07T17:26:11Z</dc:date>
    </item>
  </channel>
</rss>

