<?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: Polyline autodim lisp editting in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688751#M15637</link>
    <description>&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;maybe like that&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:pdim(/ plSet pLlst vLst oldOsn cAng cDis cPt times)
 (if (null init_list) (setq init_list '(3)))
 (princ "\n&amp;lt;&amp;lt;&amp;lt; Select LwPolyline for dimensioning &amp;gt;&amp;gt;&amp;gt; ")
 (if(setq plSet(ssget '((0 . "LWPOLYLINE"))))
   (progn
     (setq pLlst(vl-remove-if 'listp
                        (mapcar 'cadr(ssnamex plSet)))
    oldOsn(getvar "OSMODE")
	 times (getint (strcat "Times DimTxt dimension distance &amp;lt;" (itoa (nth 0 init_list)) "&amp;gt;: "))
	 times (if (null times) (nth 0 init_list) times)
    ); end if
     (setvar "OSMODE" 0)(setvar "CMDECHO" 0)
     (command "_.undo" "_be")
     (foreach pl pLlst
(setq vLst(mapcar '(lambda(x)
	   (trans x 0 1))(mapcar 'cdr
	     (vl-remove-if-not
	       '(lambda(x)(= 10(car x)))(entget pl))))
      ); end setq
(if(equal '(70 . 1)(assoc 70(entget pl)))
  (setq vLst(append vLst(list(car vLst))))
  ); end if
(while(&amp;lt; 1(length vLst))
  (setq cAng(angle(car vLst)(cadr vLst))
        cDis(/(distance(car vLst)(cadr vLst))2))
  (if(&amp;gt;=(caar vLst)(caadr vLst))
    (setq cAng(- cAng pi))
    ); end if
  (setq cPt(polar
	     (polar(car vLst)cAng cDis)
	     (+ cAng(* 0.5 pi))(* times (getvar "DIMTXT")))
	); end setq
  (command "_.dimaligned"(car vLst)(cadr vLst) cPt)
  (setq vLst(cdr vLst))
  ); end while
); end foreach
     (command "_.undo" "_e")
     (setvar "OSMODE" oldOsn)(setvar "CMDECHO" 1)
	 (setq init_list (list times))
     ); end progn
   ); end if
 (princ)
 )&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 05 Apr 2024 07:16:21 GMT</pubDate>
    <dc:creator>komondormrex</dc:creator>
    <dc:date>2024-04-05T07:16:21Z</dc:date>
    <item>
      <title>Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688340#M15636</link>
      <description>&lt;P&gt;Hi all, I found this great lisp that does all the things needed,however there is a slight problem of the dim distance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The distance is set in the script as&lt;BR /&gt;(* 3(getvar "DIMTXT")))&lt;/P&gt;&lt;P&gt;which is 3 times the Dim txt height. Every time that a different drawing needs a different distance, the script needs to be&amp;nbsp; changed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone edit this so it would jump out a prompt and we can type out the distance ourselves, or type out the type out the X amount of times of Dim txt height or smth.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 01:45:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688340#M15636</guid>
      <dc:creator>holyhexor0o0</dc:creator>
      <dc:date>2024-04-05T01:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688751#M15637</link>
      <description>&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;maybe like that&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:pdim(/ plSet pLlst vLst oldOsn cAng cDis cPt times)
 (if (null init_list) (setq init_list '(3)))
 (princ "\n&amp;lt;&amp;lt;&amp;lt; Select LwPolyline for dimensioning &amp;gt;&amp;gt;&amp;gt; ")
 (if(setq plSet(ssget '((0 . "LWPOLYLINE"))))
   (progn
     (setq pLlst(vl-remove-if 'listp
                        (mapcar 'cadr(ssnamex plSet)))
    oldOsn(getvar "OSMODE")
	 times (getint (strcat "Times DimTxt dimension distance &amp;lt;" (itoa (nth 0 init_list)) "&amp;gt;: "))
	 times (if (null times) (nth 0 init_list) times)
    ); end if
     (setvar "OSMODE" 0)(setvar "CMDECHO" 0)
     (command "_.undo" "_be")
     (foreach pl pLlst
(setq vLst(mapcar '(lambda(x)
	   (trans x 0 1))(mapcar 'cdr
	     (vl-remove-if-not
	       '(lambda(x)(= 10(car x)))(entget pl))))
      ); end setq
(if(equal '(70 . 1)(assoc 70(entget pl)))
  (setq vLst(append vLst(list(car vLst))))
  ); end if
(while(&amp;lt; 1(length vLst))
  (setq cAng(angle(car vLst)(cadr vLst))
        cDis(/(distance(car vLst)(cadr vLst))2))
  (if(&amp;gt;=(caar vLst)(caadr vLst))
    (setq cAng(- cAng pi))
    ); end if
  (setq cPt(polar
	     (polar(car vLst)cAng cDis)
	     (+ cAng(* 0.5 pi))(* times (getvar "DIMTXT")))
	); end setq
  (command "_.dimaligned"(car vLst)(cadr vLst) cPt)
  (setq vLst(cdr vLst))
  ); end while
); end foreach
     (command "_.undo" "_e")
     (setvar "OSMODE" oldOsn)(setvar "CMDECHO" 1)
	 (setq init_list (list times))
     ); end progn
   ); end if
 (princ)
 )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 07:16:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688751#M15637</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-04-05T07:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688923#M15638</link>
      <description>&lt;P&gt;thanks, it sure works&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 09:07:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/12688923#M15638</guid>
      <dc:creator>holyhexor0o0</dc:creator>
      <dc:date>2024-04-05T09:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204411#M15639</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916" target="_self"&gt;&lt;SPAN class=""&gt;komondormrex,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;First of all, thank you very much for your help. This Lisp is well used by my colleagues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;However the distance is sometimes a problem because it requires value of an interger.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Could you please edit this lisp to enter absolute number instead ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 03:17:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204411#M15639</guid>
      <dc:creator>holyhexor0o0</dc:creator>
      <dc:date>2024-12-11T03:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204584#M15640</link>
      <description>&lt;P&gt;hey there,&lt;/P&gt;&lt;P&gt;sure&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:pdim(/ plSet pLlst vLst oldOsn cAng cDis cPt times)
 (if (null init_list) (setq init_list '(3.0)))
 (princ "\n&amp;lt;&amp;lt;&amp;lt; Select LwPolyline for dimensioning &amp;gt;&amp;gt;&amp;gt; ")
 (if(setq plSet(ssget '((0 . "LWPOLYLINE"))))
   (progn
     (setq pLlst(vl-remove-if 'listp
                        (mapcar 'cadr(ssnamex plSet)))
    oldOsn(getvar "OSMODE")
	 times (getreal (strcat "Times DimTxt dimension distance &amp;lt;" (rtos (nth 0 init_list) 2 1) "&amp;gt;: "))
	 times (if (null times) (nth 0 init_list) times)
    ); end if
     (setvar "OSMODE" 0)(setvar "CMDECHO" 0)
     (command "_.undo" "_be")
     (foreach pl pLlst
(setq vLst(mapcar '(lambda(x)
	   (trans x 0 1))(mapcar 'cdr
	     (vl-remove-if-not
	       '(lambda(x)(= 10(car x)))(entget pl))))
      ); end setq
(if(equal '(70 . 1)(assoc 70(entget pl)))
  (setq vLst(append vLst(list(car vLst))))
  ); end if
(while(&amp;lt; 1(length vLst))
  (setq cAng(angle(car vLst)(cadr vLst))
        cDis(/(distance(car vLst)(cadr vLst))2))
  (if(&amp;gt;=(caar vLst)(caadr vLst))
    (setq cAng(- cAng pi))
    ); end if
  (setq cPt(polar
	     (polar(car vLst)cAng cDis)
	     (+ cAng(* 0.5 pi))(* times (getvar "DIMTXT")))
	); end setq
  (command "_.dimaligned"(car vLst)(cadr vLst) cPt)
  (setq vLst(cdr vLst))
  ); end while
); end foreach
     (command "_.undo" "_e")
     (setvar "OSMODE" oldOsn)(setvar "CMDECHO" 1)
	 (setq init_list (list times))
     ); end progn
   ); end if
 (princ)
 )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Dec 2024 06:02:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204584#M15640</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-12-11T06:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204682#M15641</link>
      <description>&lt;P&gt;Thank you it works with non interger numbers now, however sorry for not making myself clear.&lt;/P&gt;&lt;P&gt;What i meant regarding "absolute number" it the number where you offset from polyline, not the number of "multiple for text height".&lt;/P&gt;&lt;P&gt;E.G Dimal 4 units from polyline (instead of 2 times of text height 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 07:17:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204682#M15641</guid>
      <dc:creator>holyhexor0o0</dc:creator>
      <dc:date>2024-12-11T07:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204763#M15642</link>
      <description>&lt;P&gt;sorry, the following uses absolute dimension offset number.&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:pdim (/ plSet pLlst vLst oldOsn cAng cDis cPt offset)
 	(if (null init_list) (setq init_list '(3.0)))
 	(princ "\n&amp;lt;&amp;lt;&amp;lt; Select LwPolyline for dimensioning &amp;gt;&amp;gt;&amp;gt; ")
	(if (setq plSet(ssget '((0 . "LWPOLYLINE"))))
	 	(progn
	 	  	(setq pLlst (vl-remove-if 'listp (mapcar 'cadr (ssnamex plSet)))
	 	  	 	  oldOsn (getvar "OSMODE")
	 	  	  	  offset (getreal (strcat "Absolute dimension offset distance &amp;lt;" (rtos (nth 0 init_list) 2 1) "&amp;gt;: "))
	 	  	  	  offset (if (null offset) (nth 0 init_list) offset)
	 	  	); end if
	 	  	(setvar "OSMODE" 0) 
			(setvar "CMDECHO" 0)
	 	  	(command "_.undo" "_be")
	 	  	(foreach pl pLlst
				(setq vLst (mapcar '(lambda(x) (trans x 0 1))
								   (mapcar 'cdr (vl-remove-if-not '(lambda(x) (= 10 (car x))) (entget pl)))
						   )
	 	  		); end setq
				(if (equal '(70 . 1) (assoc 70 (entget pl)))
	 	 				(setq vLst(append vLst(list(car vLst))))
	 	 		); end if
				(while (&amp;lt; 1 (length vLst))
	 	 			(setq cAng (angle (car vLst) (cadr vLst))
	 	  				  cDis (/ (distance(car vLst) (cadr vLst))2)
					)
	 	 			(if	(&amp;gt;=	(caar vLst)	(caadr vLst))
	 	  				(setq cAng (- cAng pi))
	 	  			); end if
	 	 			(setq cPt (polar (polar (car vLst) cAng cDis)
	 	  					     	 (+ cAng (* 0.5 pi))
									 offset
							  )
	 	  			); end setq
	 	 			(command "_.dimaligned" (car vLst ) (cadr vLst) cPt)
	 	 			(setq vLst(cdr vLst))
	 	 		); end while
			); end foreach
	 	  	(command "_.undo" "_e")
	 	  	(setvar "OSMODE" oldOsn)
			(setvar "CMDECHO" 1)
	 	  	(setq init_list (list offset))
	 	  ); end progn
	); end if
 	(princ)
 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 08:04:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204763#M15642</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-12-11T08:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline autodim lisp editting</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204773#M15643</link>
      <description>&lt;P&gt;Thank you very much mister superman&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 08:11:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/polyline-autodim-lisp-editting/m-p/13204773#M15643</guid>
      <dc:creator>holyhexor0o0</dc:creator>
      <dc:date>2024-12-11T08:11:26Z</dc:date>
    </item>
  </channel>
</rss>

