<?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: Fix bug in Flatten lisp when deal with text objects in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234079#M24397</link>
    <description>&lt;P&gt;No, i still need the code to flatten all lines if they are outside the blocks or inside them.&lt;BR /&gt;&lt;BR /&gt;My question is how to prevent moveing text objects in x and y coordinates and only flatten them in z direction.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 08:43:12 GMT</pubDate>
    <dc:creator>hanywillim</dc:creator>
    <dc:date>2023-09-12T08:43:12Z</dc:date>
    <item>
      <title>Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12229531#M24393</link>
      <description>&lt;P&gt;Hi my friends,&lt;BR /&gt;i am using this lisp to flat all lines in the cad drawings but i found in some cad files it moves the text away from its place and that is not the desired act.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun flatall ( / a n ss)
;  (vl-load-com)
  ; flatten objects inside blocks
   (vlax-for b (vla-get-blocks (setq a (vla-get-activedocument (vlax-get-acad-object)))) ; select all blocks
       (if (= :vlax-false (vla-get-isxref b)) ; ignore xref blocks
           (vlax-for o b
               (if (vlax-write-enabled-p o) ; chk if object can be moved
                   (foreach e '(1e99 -1e99)
                       (vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e))    ; flatten to 1e99 -1e99 which = 0 elevation 
                   ) ; foreach
               ) ; if
           ) ; vlax-for
       ) ; if
   ) ; vlax-for
  ; flatten objects outside blocks
   (if(setq ss (ssget"_X")) ; select all objects
     (progn     
      (setq ss (mapcar 'vlax-ename-&amp;gt;vla-object (mapcar 'cadr (ssnamex ss)))) ; cnvert to list of entities then to vl obj
      (foreach i (list 1e99 -1e99) 
       (mapcar(function(lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 i))))) ss)    ; flatten to 1e99 -1e99 which = 0 elevation 
      ) ; foreach
     ) ; progn
   ) ; if ss
   (vla-regen a acallviewports) ; regen 
   (princ)
) ; defun flatall&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i will attach the drawings which all the texts moved away by so far from its places with no reason.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May anyone explain why that happened and how to modify the code to avoid this kind or error?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 21:58:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12229531#M24393</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-09T21:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12229689#M24394</link>
      <description>&lt;P&gt;What does the inbuilt Flatten do ?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 01:44:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12229689#M24394</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-09-10T01:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12233343#M24395</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;"inbuilt?"&amp;nbsp; You have reminded me of the old BC comic strip.&lt;/P&gt;
&lt;P&gt;BC and his buddy encounter a new species with a long snout they had never seen before.&amp;nbsp; BC says, "Maybe we're the first.&amp;nbsp; We have to name this thing.&amp;nbsp; What does he do?"&amp;nbsp; His buddy responds, "Looks like all he does is eat ants."&amp;nbsp; BC says, "That's it!&amp;nbsp; He must be an Eatanter!"&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 00:01:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12233343#M24395</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-09-12T00:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12233502#M24396</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi my friends,&lt;BR /&gt;i am using this lisp to flat all lines in the cad drawings but i found in some cad files it moves the text away from its place and that is not the desired act.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun flatall ( / a n ss)
;  (vl-load-com)
  ; flatten objects inside blocks
   (vlax-for b (vla-get-blocks (setq a (vla-get-activedocument (vlax-get-acad-object)))) ; select all blocks
       (if (= :vlax-false (vla-get-isxref b)) ; ignore xref blocks
           (vlax-for o b
               (if (vlax-write-enabled-p o) ; chk if object can be moved
                   (foreach e '(1e99 -1e99)
                       (vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e))    ; flatten to 1e99 -1e99 which = 0 elevation 
                   ) ; foreach
               ) ; if
           ) ; vlax-for
       ) ; if
   ) ; vlax-for
  ; flatten objects outside blocks
   (if(setq ss (ssget"_X")) ; select all objects
     (progn     
      (setq ss (mapcar 'vlax-ename-&amp;gt;vla-object (mapcar 'cadr (ssnamex ss)))) ; cnvert to list of entities then to vl obj
      (foreach i (list 1e99 -1e99) 
       (mapcar(function(lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 i))))) ss)    ; flatten to 1e99 -1e99 which = 0 elevation 
      ) ; foreach
     ) ; progn
   ) ; if ss
   (vla-regen a acallviewports) ; regen 
   (princ)
) ; defun flatall&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i will attach the drawings which all the texts moved away by so far from its places with no reason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May anyone explain why that happened and how to modify the code to avoid this kind or error?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't need any of this code in red:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 875px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1264943i81E8C0DECB4D18EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 02:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12233502#M24396</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2023-09-12T02:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234079#M24397</link>
      <description>&lt;P&gt;No, i still need the code to flatten all lines if they are outside the blocks or inside them.&lt;BR /&gt;&lt;BR /&gt;My question is how to prevent moveing text objects in x and y coordinates and only flatten them in z direction.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 08:43:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234079#M24397</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-12T08:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234085#M24398</link>
      <description>&lt;P&gt;Is there any one understand why the text moved to 0,0,0 point in the attached drawing?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 08:44:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234085#M24398</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-12T08:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234235#M24399</link>
      <description>&lt;P&gt;For your text, does this solve your problem?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:foo ( / ss n ent dxf_ent dxf_210 dxf_10 dxf_11)
  (setq ss (ssget '((0 . "TEXT"))))
  (repeat (setq n (sslength ss))
    (setq
      ent (ssname ss (setq n (1- n)))
      dxf_ent (entget ent)
      dxf_210 (cdr (assoc 210 dxf_ent))
      dxf_10 (trans (cdr (assoc 10 dxf_ent)) dxf_210 0)
      dxf_11 (trans (cdr (assoc 11 dxf_ent)) dxf_210 0)
      dxf_ent (subst (cons 10 (list (car dxf_10) (cadr dxf_10) 0.0)) (assoc 10 dxf_ent) dxf_ent)
      dxf_ent (subst (cons 11 (list (car dxf_11) (cadr dxf_11) 0.0)) (assoc 11 dxf_ent) dxf_ent)
      dxf_ent (subst '(210 0.0 0.0 1.0) (assoc 210 dxf_ent) dxf_ent)
    )
    (entmod dxf_ent)
  )
  (prin1)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Sep 2023 09:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234235#M24399</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2023-09-12T09:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234322#M24400</link>
      <description>&lt;P&gt;how to merge this code inside my main lisp for flatten and prevent the previous&amp;nbsp; error to happen agian&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 10:36:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234322#M24400</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-12T10:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234406#M24401</link>
      <description>&lt;P&gt;Only tested with your drawing (be carrefull)&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun flatall ( / a n ss n ent dxf_ent dxf_210 dxf_10 dxf_11)
  (vl-load-com)
  ; flatten objects inside blocks
   (vlax-for b (vla-get-blocks (setq a (vla-get-activedocument (vlax-get-acad-object)))) ; select all blocks
       (if (= :vlax-false (vla-get-isxref b)) ; ignore xref blocks
           (vlax-for o b
               (if (and (vlax-write-enabled-p o) (not (member (vlax-get o 'ObjectName) '("AcDbText" "AcDbMText")))) ; chk if object can be moved
                   (foreach e '(1e99 -1e99)
                       (vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e))    ; flatten to 1e99 -1e99 which = 0 elevation 
                   ) ; foreach
               ) ; if
           ) ; vlax-for
       ) ; if
   ) ; vlax-for
   (vla-regen a acallviewports) ; regen 
  (setq ss (ssget "_X" '((0 . "TEXT"))))
  (repeat (setq n (sslength ss))
    (setq
      ent (ssname ss (setq n (1- n)))
      dxf_ent (entget ent)
      dxf_210 (cdr (assoc 210 dxf_ent))
      dxf_10 (trans (cdr (assoc 10 dxf_ent)) dxf_210 0)
      dxf_11 (trans (cdr (assoc 11 dxf_ent)) dxf_210 0)
      dxf_ent (subst (cons 10 (list (car dxf_10) (cadr dxf_10) 0.0)) (assoc 10 dxf_ent) dxf_ent)
      dxf_ent (subst (cons 11 (list (car dxf_11) (cadr dxf_11) 0.0)) (assoc 11 dxf_ent) dxf_ent)
      dxf_ent (subst '(210 0.0 0.0 1.0) (assoc 210 dxf_ent) dxf_ent)
    )
    (entmod dxf_ent)
  )
   (princ)
) ; defun flatall&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:11:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234406#M24401</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2023-09-12T11:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234426#M24402</link>
      <description>&lt;P&gt;i still need the part to flatten lines outside the blocks i can not find it in the code&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:20:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234426#M24402</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-12T11:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234822#M24403</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;No, i still need the code to flatten all lines if they are outside the blocks or inside them.&lt;BR /&gt;&lt;BR /&gt;My question is how to prevent moveing text objects in x and y coordinates and only flatten them in z direction.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This portion of the code processes block definitions as well as layouts so the code below it is redundant. Did you know that a layout is a 'block'? Try this:&amp;nbsp;(tblobjname "block" "*Model_Space")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;  ; flatten objects inside blocks
   (vlax-for b (vla-get-blocks (setq a (vla-get-activedocument (vlax-get-acad-object)))) ; select all blocks
       (if (= :vlax-false (vla-get-isxref b)) ; ignore xref blocks
           (vlax-for o b
               (if (vlax-write-enabled-p o) ; chk if object can be moved
                   (foreach e '(1e99 -1e99)
                       (vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e))    ; flatten to 1e99 -1e99 which = 0 elevation 
                   ) ; foreach
               ) ; if
           ) ; vlax-for
       ) ; if
   ) ; vlax-for&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 14:08:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12234822#M24403</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2023-09-12T14:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235445#M24404</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I tried my SQUASH on all your entities, and the cyan text didn't cooperate fully.&amp;nbsp; I found it was because of its normal&amp;nbsp;(210 -0.000372211 0.0017426 0.999998).&amp;nbsp; I don't know if that was intended, but as soon as I modified it to (0.0 0.0 1.0) its Z became zero and its X,Y hadn't changed (at least as far as I could tell).&lt;/P&gt;
&lt;P&gt;So, should my SQUASH set every normal to normal (WCS), or should it just warn the user of non-world normals?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 18:14:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235445#M24404</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-09-12T18:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235482#M24405</link>
      <description>&lt;P&gt;So, Can you provide me with the full correct code to handle this, Please?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 18:33:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235482#M24405</guid>
      <dc:creator>hanywillim</dc:creator>
      <dc:date>2023-09-12T18:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235491#M24406</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;So, do you think I should add the automatic Normal correction, or just a warning?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 18:37:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235491#M24406</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-09-12T18:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235627#M24407</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;This should do it.&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:flatall (/ a n ss)
  (vlax-for b (vla-get-blocks (setq a (vla-get-activedocument (vlax-get-acad-object))))
    (if	(= :vlax-false (vla-get-isxref b))
      (vlax-for	o b
	(if (vlax-write-enabled-p o)
	  (progn (vl-catch-all-apply 'vlax-put (list o 'normal '(0.0 0.0 1.0)))
		 (foreach e '(1e99 -1e99) (vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e)))
	  )
	)
      )
    )
  )
  (vla-regen a acallviewports)
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 19:48:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235627#M24407</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2023-09-12T19:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fix bug in Flatten lisp when deal with text objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235632#M24408</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4341616"&gt;@hanywillim&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You didn't answer so I included automated correction of each entity's normal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 19:51:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fix-bug-in-flatten-lisp-when-deal-with-text-objects/m-p/12235632#M24408</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-09-12T19:51:42Z</dc:date>
    </item>
  </channel>
</rss>

