<?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: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp;amp; for user defined offset distance multiplication in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490186#M19727</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for your Replies which works totally great for my need and satisfies most of my needs.&lt;BR /&gt;&lt;BR /&gt;Actually i have one more request to your respective codes,&lt;BR /&gt;I know i should have mentioned earlier, which would have been a easy one time modification process but now only i have noticed that aligned dimension objects gets executed in both of your codes which arises my new requirement so i am requesting you.&lt;BR /&gt;&lt;BR /&gt;I need user to be prompted for type of dimension needed to be drafted&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.Rotated Dimension&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.Aligned Dimension&lt;BR /&gt;And as per the user requirement the Linear and Aligned Dimension gets executed for the polyline(Line segments) accordingly and arc length segments remains same as Arc Length Dimension.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Pankaj.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 07:42:27 GMT</pubDate>
    <dc:creator>pankaj</dc:creator>
    <dc:date>2024-01-11T07:42:27Z</dc:date>
    <item>
      <title>Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication factor.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12475856#M19719</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;Happy New year all. I am Pankaj.&lt;BR /&gt;Thanks to Mr. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&amp;nbsp;for the following source code.&lt;BR /&gt;&lt;BR /&gt;Please help me in modifying this below Auto dimension LISP code for Polyline with the following needs,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I have noticed that this LISP program is made for arc segment dimensioned as 3 Point Angular Dimension. But i need Arc Length Dimension instead of 3 Point Angular Dimension.&lt;/LI&gt;&lt;LI&gt;The height of the dimension from the polyline is maintained as 1.5 times of the text height of the dimension style. I want this code to prompt user for defining the multiplication factor instead of 1.5 as a standard value. so user defined&amp;nbsp; value multiplied by the text height shall be the final distance from the polyline to the dimension line.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;;; DimPoly.lsp [command names: DPI = Dimension Polyline(s) Inside, DPO = Outside]
;; To dimension the lengths of all segments of selected Polylines on the Inboard or
;; Outboard side. For self-intersecting or open Polyline without a clear "inside" and
;; "outside," will determine a side -- if not as desired, undo and run other command.
;; Dimensions along arc segments will be angular Dimensions, showing length of arc
;; as text override, not included angle native to angular Dimensions. They will not
;; update if Polyline is stretched, as those along line segments will; redo DPI/DPO.
;; Uses current Dimension and Units settings; dimension line location distance from
;; Polyline segment = 1.5 x dimension text height for stacked fractions to clear [see
;; commentary at setting of dtxt variable re: stacked fractions].
;; Accepts LW and 2D "heavy" Polylines, but not 3D Polylines or meshes. Rejects any
;; on locked Layers, because of Offset used to determine inside/outside.
;; Kent Cooper, last edited 18 May 2016

(vl-load-com)

(defun DP (side / *error* doc svnames svvals styht dpss n pl cw inc pt1 pt3 pt2 ang1 ang2 dtxt pt4)

(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg))
); if
(mapcar 'setvar svnames svvals); reset System Variables
(vla-endundomark doc)
(princ)
); defun -- *error*

(vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object))))
(setq ; System Variable saving/resetting without separate variables for each:
svnames '(osmode cmdecho blipmode clayer)
svvals (mapcar 'getvar svnames)
); setq
(mapcar 'setvar svnames '(0 0)); turn off Osnap, command echoing
(command "_.layer" "_make" "A-ANNO-DIMS" "_color" 2 "" "");; &amp;lt;---EDIT Layer name/color as desired
(setq styht (cdr (assoc 40 (tblsearch "style" (getvar 'dimtxsty))))); height of text style in current dimension style
(if (= styht 0.0) (setq styht (* (getvar 'dimtxt) (getvar 'dimscale)))); if above is non-fixed-height

(prompt (strcat "\nTo Dimension Polyline(s) on the " side "side,"))
(if (setq dpss (ssget "_:L" '((0 . "*POLYLINE"))))
(progn ; then [can omit this if you never use blips; also two other lines below]
(setvar 'blipmode 0); [omit if you never use blips and omitted line above]
(repeat (setq n (sslength dpss)); step through selection set
(setq pl (ssname dpss (setq n (1- n))))
(if (= (logand (cdr (assoc 70 (entget pl))) 88) 0)
;; not 3D or mesh [88 = 8 (3D) + 16 (polygon mesh) + 64 (polyface mesh)]
(progn ; then
(setq pl (vlax-ename-&amp;gt;vla-object pl))
(vla-offset pl styht); temporary
(setq cw (&amp;lt; (vla-get-area (vlax-ename-&amp;gt;vla-object (entlast))) (vla-get-area pl)))
;; clockwise for closed or clearly inside/outside open; may not give
;; desired result for open without obvious inside/outside
(entdel (entlast))
(repeat (setq inc (fix (vlax-curve-getEndParam pl))); segments
(setq
pt1 (vlax-curve-getPointAtParam pl inc)
pt3 (vlax-curve-getPointAtParam pl (1- inc))
); setq
(if (not (equal pt1 pt3 1e-8)); not coincident vertices
(progn ; then -- proceed to dimension segment
(setq
pt2 (vlax-curve-getPointAtParam pl (- inc 0.5)); segment midpoint
ang1 (angle pt1 pt2)
ang2 (angle pt2 pt3)
); setq
(if
(or ; line segment?
(equal ang1 ang2 1e-8); any non-0 direction or both reading as 0 or 2 pi
(equal (abs (- ang2 ang1)) (* pi 2) 1e-8); 0-degree with one reading as 2 pi +/-
); or
(command "_.dimaligned" pt1 pt3); then [leaves at dimension line location prompt]
(progn ; else [arc segment]
(setq dtxt
(rtos
(abs ; length along arc segment
(- (vlax-curve-getDistAtParam pl inc) (vlax-curve-getDistAtParam pl (1- inc)))
); abs
;; [include mode/precision here if current dimension style's settings not desired]
); rtos
); setq
(if (wcmatch dtxt "*/*"); includes fraction?
;; can omit this entire (if) function if you don't use stacked fractions
(setq dtxt ; stack it
(strcat
"\\A1;"
(vl-string-subst ";}\"" "\""
; (vl-string-subst "#" "/"
;; remove ; from beginning of above line and its closing parenthesis line
;; below to make diagonal stack [makes horizontal-line stack without]
(vl-string-subst "{\\H0.875x;\\S" " " dtxt)
;; change 0.875 ratio to agree with Dimension Style's setting
; ); -subst
); -subst
); strcat &amp;amp; dtxt
); setq
); if
(command
"_.dimangular" ""
(inters ; arc center
(setq pt4 (mapcar '/ (mapcar '+ pt1 pt2) '(2 2 2)))
(polar pt4 (+ (angle pt1 pt2) (/ pi 2)) 1)
(setq pt4 (mapcar '/ (mapcar '+ pt2 pt3) '(2 2 2)))
(polar pt4 (+ (angle pt2 pt3) (/ pi 2)) 1)
nil
); inters
pt1 pt3
"_text" dtxt
); command [leaves at dimension line location prompt]
); progn
); if
(command ; complete Dimension: dimension line location
(polar
pt2
(apply ; angle
(if (or (and cw (= side "in")) (and (not cw) (= side "out"))) '- '+)
(list
(angle '(0 0 0) (vlax-curve-getFirstDeriv pl (- inc 0.5)))
(/ pi 2)
); list
); apply
(* styht 1.5); distance
;; [If you don't use stacked fractions, consider using styht without multiplier]
); polar
); command
); progn
); if [not coincident]
(setq inc (1- inc))
); repeat [segments]
); progn -- then [LW/2D]
); if
); repeat [Polylines]
); progn -- then [valid selection]; [omit if you never use blips and omitted 2 lines above]
(prompt "\nNo Polyline(s) on unlocked Layer(s) selected."); else
); if

(mapcar 'setvar svnames svvals); reset System Variables
(vla-endundomark doc)
(princ)
); defun -- DP

(defun C:DPI () (DP "in")); = Dimension Polyline Inside
(defun C:DPO () (DP "out")); = Dimension Polyline Outside

(prompt "\nType DPI to Dimension Polyline(s) on the Inside, DPO to do so on the Outside.")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks and cheers for you help in advance.&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pankaj&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 11:55:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12475856#M19719</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-10T11:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12488705#M19720</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4466331"&gt;@pankaj&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;.... this LISP program is made for arc segment dimensioned as 3 Point Angular Dimension. But i need Arc Length Dimension instead of 3 Point Angular Dimension. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just so you know, when this was first developed the DIMARC command did not yet exist.&amp;nbsp; That's why it uses an Angular Dimension with text override.&amp;nbsp; I may take a look at updating it, and at asking the User for the offset distance [meanwhile, you can follow the comments to change that if you have a regular need different from what it uses], later today.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 16:02:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12488705#M19720</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-10T16:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489131#M19721</link>
      <description>&lt;P&gt;hey Pankaj,&lt;/P&gt;&lt;P&gt;check this other one with arc length dimensions incorporated.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/quick-dimension-with-fixed-spacing-from-object/m-p/12289575#M455824" target="_blank" rel="noopener"&gt;dimize pline&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:50:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489131#M19721</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-01-10T18:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489175#M19722</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dimarc&lt;/STRONG&gt;&lt;/EM&gt; was introduced in autocad 2006, that is almost 18 yrs ago. is that very program that old?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 19:19:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489175#M19722</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-01-10T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489233#M19723</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;dimarc&lt;/STRONG&gt;&lt;/EM&gt; was introduced in autocad 2006, that is almost 18 yrs ago. is that very program that old?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Originally, yes.&amp;nbsp; There have been updates, particularly several variations &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pline-dimensioning/td-p/1549734" target="_blank" rel="noopener"&gt;&amp;gt;here&amp;lt;&lt;/A&gt;, so last-edited dates are more recent than 2006, but I didn't adjust that part of it -- the updates were about other aspects.&amp;nbsp; But I'll put the new one there, too.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:10:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489233#M19723</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-10T20:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489236#M19724</link>
      <description>&lt;P&gt;Try the attached.&amp;nbsp; See the comments at the top [in general, and also for an explanation of the different file name].&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:10:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12489236#M19724</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-10T20:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490124#M19725</link>
      <description>Thanks Mr. Kent Cooper for your valuable time and swiftly reply.&lt;BR /&gt;This AutoLISP works very well and clearly added advantages to my most of the need &amp;amp; requirement.</description>
      <pubDate>Thu, 11 Jan 2024 07:09:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490124#M19725</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-11T07:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490168#M19726</link>
      <description>Thanks Mr. Komondormrex for your Awesome code which is working really cool.&lt;BR /&gt;&lt;BR /&gt;Initially i have searched a lot before posting my need but i didn't get your pinned post.&lt;BR /&gt;May be relative keywords didn't match i think so.&lt;BR /&gt;&lt;BR /&gt;You are really a great coder thanks a lot for your contribution.</description>
      <pubDate>Thu, 11 Jan 2024 07:28:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490168#M19726</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-11T07:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490186#M19727</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for your Replies which works totally great for my need and satisfies most of my needs.&lt;BR /&gt;&lt;BR /&gt;Actually i have one more request to your respective codes,&lt;BR /&gt;I know i should have mentioned earlier, which would have been a easy one time modification process but now only i have noticed that aligned dimension objects gets executed in both of your codes which arises my new requirement so i am requesting you.&lt;BR /&gt;&lt;BR /&gt;I need user to be prompted for type of dimension needed to be drafted&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.Rotated Dimension&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.Aligned Dimension&lt;BR /&gt;And as per the user requirement the Linear and Aligned Dimension gets executed for the polyline(Line segments) accordingly and arc length segments remains same as Arc Length Dimension.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Pankaj.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 07:42:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490186#M19727</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-11T07:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490874#M19728</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4466331"&gt;@pankaj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... I need user to be prompted for type of dimension needed to be drafted&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.Rotated Dimension&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.Aligned Dimension&lt;BR /&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you illustrate what you want from the Rotated option?&amp;nbsp; Each Dimension Rotated at the angle of the segment it measures?&amp;nbsp; [If so, why, since the result is the same as Aligned?]&amp;nbsp;&amp;nbsp;The difference is considerable if you need to change the path by Stretching:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DimAliRot.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1313106i1085A5BD7E7A37B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DimAliRot.gif" alt="DimAliRot.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Rotated one &lt;EM&gt;will no longer show the actual length&lt;/EM&gt; of what it measures.&lt;/P&gt;
&lt;P&gt;Or all Rotated at the &lt;EM&gt;same&lt;/EM&gt; angle?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1704981278535.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1313111iE34092E67AB14194/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1704981278535.png" alt="Kent1Cooper_0-1704981278535.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And if that's what you mean, the &lt;EM&gt;inside&lt;/EM&gt; version could be really weird, and either inside or outside, the dimension-line positioning would be a real challenge to figure out how to automate, if it's even possible.&lt;/P&gt;
&lt;P&gt;Or something else?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:58:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490874#M19728</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-11T13:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490922#M19729</link>
      <description>&lt;P&gt;i guess that the case is that moving grips of extension lines in aligned dimension will rotate align dimension and change its offset, which will not occur in rotated dimension.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:56:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12490922#M19729</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-01-11T13:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12491035#M19730</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i guess that the case is that moving grips of extension lines in aligned dimension will rotate align dimension and change its offset, which will not occur in rotated dimension.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Changing the offset occurs when the first definition point is Stretched, but not the second.&amp;nbsp; Here, DPO has Dimensioned the red Polyline in the direction that those Dimensions that are being Stretched have their first definition point toward the right:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DimAliStr.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1313139i2AE0280911CF321B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DimAliStr.gif" alt="DimAliStr.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The rightward one has its first definition point left alone but its second Stretched, so its offset remains.&amp;nbsp; The leftward one has its first definition point Stretched, and its offset is affected, somewhat like what happens with DIMARC Dimensions.&amp;nbsp; I don't know whether that can be prevented or compensated for.&lt;/P&gt;
&lt;P&gt;But with a Rotated Dimension, yes, the dimension-line location doesn't change with Stretching, but that is meaningless in terms off offset distance unless the Stretching is only &lt;EM&gt;in the direction of the angle of its segment&lt;/EM&gt;&amp;nbsp;[see my previous Reply -- what is the "offset distance" when the dimension line is not parallel to the dimensioned object?].&amp;nbsp; I would think it cannot be assumed that Stretching would always and only be in the direction of an edge, and in a Polyline, it &lt;EM&gt;cannot&lt;/EM&gt; be only in the directions of two adjacent edges at the same time.&lt;/P&gt;
&lt;P&gt;Can you post a drawing showing before and after using Rotated Dimensions?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 14:29:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12491035#M19730</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-11T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12492577#M19731</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks Again For your Valuable time and Support. It means a lot to me.&lt;BR /&gt;&lt;BR /&gt;Please do Find the Attached Image and the same content drawing file of my needs and what i have asked for in this Forum for your reference.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pankaj_0-1705044171239.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1313428i19527ED9541E0C18/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pankaj_0-1705044171239.png" alt="pankaj_0-1705044171239.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The above AutoDim Needs is for representing the Rebar Lengths for the bar bending and scheduling purpose.&lt;BR /&gt;Some times the angle will be locked but length will be changing with respect this Rotated Dimension and Aligned Dimensions are used as per the need.&lt;BR /&gt;&lt;BR /&gt;For the UCS world Condition for the following angles "0d, 90d, 180d, 270d" Rotated Dim is used by me and rest all angles follows Aligned Dimension.&lt;BR /&gt;For other UCS conditions for the polyline as per the need it will be decided by me for Rotated Dimension or Angular Dimension.&lt;BR /&gt;I hope i have been clear with my requirements and request in this Forum.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Cheers.&lt;BR /&gt;Pankaj&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 07:34:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12492577#M19731</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-12T07:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12514803#M19732</link>
      <description>&lt;P&gt;Thanks for your support.&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Got the need and met my requirements As great as possible.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 06:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12514803#M19732</guid>
      <dc:creator>pankaj</dc:creator>
      <dc:date>2024-01-23T06:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Auto Dimensioning of Polylines LISP code for dimensioning arc segment with arc length dimension instead of 3 point angular dimension &amp; for user defined offset distance multiplication</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12582423#M19733</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4466331"&gt;@pankaj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;added selecting aligned/rotated linear dimension option&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;;**************************************************************************************************************************************************************************************

;	komondormrex, feb 2024

;**************************************************************************************************************************************************************************************

(defun c:dimize_pline (/ command_terminated dim_offset linear_dimensions pline_object next_param param_list bulge_list segment_list segment_start segment_end segment_middle
						 segment_bulge dim_object center_point
					  )

	;**********************************************************************************************************************************************************************************

	(defun get_prompted_value (initget_value get_function prompt_string var command_terminated / default_string var_saved)
		(if (/= 3 (getvar 'dynmode)) (setvar 'dynmode 3))
		(if (null command_terminated)
			(progn
				(setq var_saved (read (strcat (vl-symbol-name var) "_saved")))
				(cond
					(
						(null (vl-symbol-value var_saved))
							(setq default_string "")
					)
					(
						(= 'str (type (vl-symbol-value var_saved)))
							(setq default_string (vl-symbol-value var_saved))
					)
					(
						t
							(setq default_string (rtos (vl-symbol-value var_saved)))
					)
				)
				(initget initget_value)
	 			(set var (vl-catch-all-apply get_function (list (strcat "\n" prompt_string " &amp;lt;" default_string "&amp;gt;: "))))
	 			(cond
	 				(
						(or
							(null (vl-symbol-value var))
							(= "" (vl-symbol-value var))
						)
	 						(set var (vl-symbol-value var_saved))
	 				)
	 				(
	 					(vl-catch-all-error-p (vl-symbol-value var))
	 						(setq command_terminated t)
	 				)
	 				(
	 					t
	 						(set var_saved (vl-symbol-value var))
	 				)
	 			)
			)
		)
	 	command_terminated
	)

	;**********************************************************************************************************************************************************************************

	(defun arc_segment_center (bulge start_point end_point)
		(polar (polar start_point
					  (angle start_point end_point)
					  (* 0.5 (distance start_point end_point))
			   )
			   (- (angle start_point end_point) (* 0.5 pi))
			   (/ (* 0.5 (distance start_point end_point))
			   	  (/ (sin (- pi (* 2 (atan bulge))))
				  	 (cos (- pi (* 2 (atan bulge))))
				  )
			   )
		)
	)

	;**********************************************************************************************************************************************************************************

	(defun find_pline_rotation (segment_list pline_object / angle_list)
		(defun diff_angle (angle_1 angle_2)
		  	(setq angle_1 (if (&amp;gt; angle_2 (+ pi angle_1)) (+ (* pi 2) angle_1) angle_1))
		  	(setq angle_2 (if (&amp;gt; angle_1 (+ pi angle_2)) (+ (* pi 2) angle_2) angle_2))
		  	(- angle_2 angle_1)
		)
		(setq angle_list (mapcar '(lambda (segment) (angle (vlax-curve-getpointatparam pline_object (car segment))
		  												   (vlax-curve-getpointatparam pline_object (cadr segment))
													)
								  )
				 	  			  segment_list
			 		   	  )
		)
		(if (&amp;gt; (apply '+ (mapcar '(lambda (angle_1 angle_2) (diff_angle angle_1 angle_2)) angle_list (cdr angle_list))) 0) t nil)
	)

	;**********************************************************************************************************************************************************************************

	(if (not (minusp (vlax-get (vla-get-activelayer (vla-get-activedocument (vlax-get-acad-object))) 'lock)))
			(progn
				(vla-startundomark (vla-get-activedocument (vlax-get-acad-object)))
				(if (null dim_offset_saved) (setq dim_offset_saved 10))
				(if (null linear_dimensions_saved) (setq linear_dimensions_saved "Aligned"))
				(and
				 	(null (get_prompted_value 0 'getdist "Dimension offset:" 'dim_offset command_terminated))
				 	(null (get_prompted_value "Aligned Rotated" 'getkword "Linear dimensions [Aligned/Rotated]" 'linear_dimensions command_terminated))
					(repeat (sslength (setq ename_index -1
											ignore_empty_sset (while (null (setq pline_sset (vl-catch-all-apply 'ssget (list '((0 . "lwpolyline")))))))
											pline_sset (cond
																	(
																		(vl-catch-all-error-p pline_sset)
																			(princ "\nCommand cancelled")
																			(ssadd)
																	)
																	(
																		t
																			pline_sset
																	)
													  		)
									   )
							)
							(setq pline_object (vlax-ename-&amp;gt;vla-object (ssname pline_sset (setq ename_index (1+ ename_index))))
								  next_param -1
								  param_list nil
								  bulge_list nil
							)
							(repeat (fix (vlax-curve-getendparam pline_object))
								(setq param_list (append param_list (list (setq next_param (1+ next_param))))
									  bulge_list (append bulge_list (list (vla-getbulge pline_object next_param)))
								)
							)
							(setq segment_list (mapcar '(lambda (param next_param bulge) (list param next_param bulge))
														param_list
														(append (cdr param_list) (list (1+ (last param_list))))
														bulge_list
												)
							)
							(if (find_pline_rotation segment_list pline_object) (setq modify_angle '-) (setq modify_angle '+))
							(foreach segment segment_list
								(setq segment_start (vlax-curve-getpointatparam pline_object (car segment))
									  segment_end (vlax-curve-getpointatparam pline_object (cadr segment))
									  segment_middle (vlax-curve-getpointatparam pline_object (* 0.5 (+ (car segment)(cadr segment))))
									  segment_bulge (last segment)
								)
								(cond
									(
										(zerop segment_bulge)
											(if (= "Rotated" linear_dimensions)
													(setq dim_object (vla-adddimrotated (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
																   						(vlax-3d-point segment_start)
																   						(vlax-3d-point segment_end)
																   						(vlax-3d-point (polar segment_middle
																											  ((eval modify_angle) (angle segment_start segment_end) (* 0.5 pi))
																											  dim_offset
																									   )
																						)
																						(angle segment_start segment_end)
																 	)
													)
													(setq dim_object (vla-adddimaligned (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
																   						(vlax-3d-point segment_start)
																   						(vlax-3d-point segment_end)
																   						(vlax-3d-point (polar segment_middle
																											  ((eval modify_angle) (angle segment_start segment_end) (* 0.5 pi))
																											  dim_offset
																									   )
																						)
																 	)
													)
											)
									)
									(
										t
											(setq center_point (arc_segment_center segment_bulge segment_start segment_end))
											(setq dim_object (vla-adddimarc (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
																 			(vlax-3d-point center_point)
																 			(vlax-3d-point segment_start)
																 			(vlax-3d-point segment_end)
																			(vlax-3d-point (polar segment_middle ((eval modify_angle) (angle segment_start segment_end) (* 0.5 pi)) dim_offset))
															 )
											)
									)
								)
							)
					)
				)
			(vla-endundomark (vla-get-activedocument (vlax-get-acad-object)))
		)
		(alert "       Active layer is locked")
	)
	(princ)
)

;**************************************************************************************************************************************************************************************&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Feb 2024 06:37:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modifying-auto-dimensioning-of-polylines-lisp-code-for/m-p/12582423#M19733</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-02-26T06:37:30Z</dc:date>
    </item>
  </channel>
</rss>

