<?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: Auto trim in circle in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115791#M119652</link>
    <description>&lt;PRE&gt;(defun c:trimincircle ()
(vl-load-com)

(defun *error* (msg)
	(setvar "osmode" old-os)
	(princ msg)
	(princ)
);defun error

(setq old-os (getvar "osmode"))
(setvar "osmode" 0)

(setq sset (ssget (list (cons 0 "CIRCLE"))))
(setq n 0)

(repeat (sslength sset)
(setq obj (ssname sset n))
(setq obj1 (vlax-ename-&amp;gt;vla-object obj))
(setq cen (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-get-center obj1))))
(setq rad (vla-get-radius obj1))
(setq p 0)

(defun DTR (ang)
	(* PI (/ ang 180.0))
);defun DTR

(setq ang 0)



(repeat 360
	(setq p1 cen)
	(setq p2 (polar p1 (DTR ang) rad))
	(command "trim" obj "" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat


(repeat 360
	(setq p1 cen)
	(setq p2 (polar p1 (DTR ang) (- rad (* 0.1 rad))))
	(command "erase" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat

(setq n (1+ n))
);repeat



(princ)
(*error*)

);defun&lt;/PRE&gt;
&lt;P&gt;It may help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 03:55:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-30T03:55:05Z</dc:date>
    <item>
      <title>Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7114801#M119650</link>
      <description>&lt;P&gt;Hello, I have lisp that trim one line in circle, Can someone change lisp, so when I press with node (ask size of circle) and automatic all line in circle to trim, not only one. I try but didnt successful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:at ()&lt;BR /&gt;(C:BreakAtMidPoint)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(defun C:BreakAtMidPoint (/ entItem lstPoint sngDistance)&lt;BR /&gt;(if (setq sngDistance (getdist "\nEnter Break Length: "))&lt;BR /&gt;(while (and&lt;BR /&gt;(vl-cmdf "circle" "End" pause)&lt;BR /&gt;(vl-cmdf (/ sngDistance 2.0))&lt;BR /&gt;(setq entItem (entlast))&lt;BR /&gt;(setq lstPoint (getvar "lastpoint"))&lt;BR /&gt;)&lt;BR /&gt;(vl-cmdf "trim" entItem "" "Nea" lstPoint "")&lt;BR /&gt;(vl-cmdf "erase" entItem "")&lt;BR /&gt;(setq entItem nil)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(vl-load-com)&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 12:59:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7114801#M119650</guid>
      <dc:creator>Avan7garde</dc:creator>
      <dc:date>2017-05-29T12:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115085#M119651</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="3"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="georgia,palatino" size="3"&gt;You can use&amp;nbsp;the command extrim if you have the Express Tools installed along with your AutoCAD.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 15:54:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115085#M119651</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2017-05-29T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115791#M119652</link>
      <description>&lt;PRE&gt;(defun c:trimincircle ()
(vl-load-com)

(defun *error* (msg)
	(setvar "osmode" old-os)
	(princ msg)
	(princ)
);defun error

(setq old-os (getvar "osmode"))
(setvar "osmode" 0)

(setq sset (ssget (list (cons 0 "CIRCLE"))))
(setq n 0)

(repeat (sslength sset)
(setq obj (ssname sset n))
(setq obj1 (vlax-ename-&amp;gt;vla-object obj))
(setq cen (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-get-center obj1))))
(setq rad (vla-get-radius obj1))
(setq p 0)

(defun DTR (ang)
	(* PI (/ ang 180.0))
);defun DTR

(setq ang 0)



(repeat 360
	(setq p1 cen)
	(setq p2 (polar p1 (DTR ang) rad))
	(command "trim" obj "" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat


(repeat 360
	(setq p1 cen)
	(setq p2 (polar p1 (DTR ang) (- rad (* 0.1 rad))))
	(command "erase" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat

(setq n (1+ n))
);repeat



(princ)
(*error*)

);defun&lt;/PRE&gt;
&lt;P&gt;It may help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 03:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115791#M119652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-30T03:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115847#M119653</link>
      <description>&lt;P&gt;the second one is good, but can you add my command in your so when I use command automatic enter the size of circle and in that circle trim all lines?&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 05:04:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7115847#M119653</guid>
      <dc:creator>Avan7garde</dc:creator>
      <dc:date>2017-05-30T05:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7116764#M119654</link>
      <description>&lt;P&gt;my lisp is good but it only trim one line, and the polyline trim both side, and circle disappear, I need that but for all lines or poly lines&amp;nbsp;disappear with one click, when I click on middle it ask what dimension to create circle, 0.5 and it create circle trim one line and circle&amp;nbsp;disappear, so with one click to&amp;nbsp;disappear all inside, i try to mix those two lisp but it not good.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 13:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7116764#M119654</guid>
      <dc:creator>Avan7garde</dc:creator>
      <dc:date>2017-05-30T13:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7118605#M119655</link>
      <description>&lt;PRE&gt;(defun c:at ()
(vl-load-com)

(defun *error* (msg)
	(setvar "osmode" old-os)
	(princ msg)
	(princ)
);defun error

(setq old-os (getvar "osmode"))
(setvar "osmode" 0)


(defun DTR (ang)
	(* PI (/ ang 180.0))
);defun DTR


(setq a 0)

(while a
(progn

(setq dst (getdist "\n Enter Break distance:"))
(setq p1 (getpoint "\n Pick the point:"))

(command "circle" p1 dst)
(setq obj (entlast))


(setq ang 0)



(repeat 360
	(setq p2 (polar p1 (DTR ang) dst))
	(command "trim" obj "" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat

(setq ang 0)

(repeat 360
	
	(setq p2 (polar p1 (DTR ang) (- dst (* 0.05 dst))))
	(command "erase" "f" p1 p2 "" "")
	(setq ang (1+ ang))
);repeat

(command "erase" obj "")

);progn
);while


(princ)
(*error*)

);defun&lt;/PRE&gt;
&lt;P&gt;It may help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STM&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 04:41:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7118605#M119655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T04:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Auto trim in circle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7118648#M119656</link>
      <description>&lt;P&gt;this is good, but can you&amp;nbsp;just change from to pick the point to node, cos all my point is node&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the better one for my job and faster, but tnx anyway&lt;/P&gt;&lt;PRE&gt;;....................  Spajanje tocaka sa razmakom ....................... 
(defun C:LIN()
    (setvar "CMDECHO" 0)
    (if (= mj nil) (setq mj 1000))
    (setq mjr mj)
    (princ "Mjerilo &amp;lt;1:") 
    (princ mjr)
    (setq mj (getint "&amp;gt; ")) 
    (if (= mj nil) (setq mj mjr))

    (if (= raz nil) (setq raz 1.3))
    (princ "\nRazmak crta-tocka (mm) &amp;lt;")
    (princ raz) 
    (setq razx (getreal "&amp;gt;"))
    (if (/= razx nil) (setq raz razx))
    (setq hg (* (/ (float mj) 1000.0) raz))

    (setq w (ssget))
    (setq n (sslength w))
    (setq n1 0) 

    (repeat n       
        (setq e (entget (ssname w n1)))
        (if (= "LINE" (cdr (assoc 0 e)))
           (progn    
	     (setq koo1 (assoc 10 e))
	     (setq koo2 (assoc 11 e))

	     (setq y (nth 1 koo1))
	     (setq x (nth 2 koo1))
             (setq p1 (list y x 0.0))
      
	     (setq y (nth 1 koo2))
	     (setq x (nth 2 koo2))
             (setq p2 (list y x 0.0))

             (setq d (distance p1 p2))
             (setq a (angle p1 p2))
             (setq t1 (polar p1 a raz))
             (setq t2 (polar p1 a (- d raz)))

		 (setq hs (assoc 10 e))
                 (setq hn (cons 10 t1))  
		 (setq e (subst hn hs e))

		 (setq hs (assoc 11 e))
                 (setq hn (cons 11 t2))  
		 (setq e (subst hn hs e))

                 (entmod e)        
	   )
	)
        (setq n1 (+ n1 1))    
    )
)
&amp;#26;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 05:04:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-trim-in-circle/m-p/7118648#M119656</guid>
      <dc:creator>Avan7garde</dc:creator>
      <dc:date>2017-05-31T05:04:51Z</dc:date>
    </item>
  </channel>
</rss>

