<?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: LISP To change text width factor inside a block that is text only? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184258#M45271</link>
    <description>&lt;P&gt;Try this. You should have posted a sample to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:BTextWidth nil
  (vlax-for b (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object))))
    (if (and (= 0 (vlax-get b 'islayout))
	     (= 0 (vlax-get b 'isxref))
	     (/= "AcDbBlockReference" (vlax-get b 'objectname))
	     )
      (vlax-for e b
	(if (and (= "AcDbText" (vlax-get e 'objectname)
		 (vlax-write-enabled-p e)
		 )
	  (vla-put-scalefactor e 1)))))
  (vla-regen doc acactiveviewport) 
  (princ)
)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 May 2022 17:48:08 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2022-05-21T17:48:08Z</dc:date>
    <item>
      <title>LISP To change text width factor inside a block that is text only?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184191#M45270</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I have alot of blocks that are all different. When I go into the block (-bedit) the symbol is a letter or number in the middle of the block. It is text and not an attribute definition. The width factor is .85 and I need to change it to one. I tried Battman but this not show in the list because it's not an attribute definition.&lt;/P&gt;&lt;P&gt;Is there an LSP out that will go through all the blocks, find the text, it's width factor and change it to what you desire? Please help, thank you in advance&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 12:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184191#M45270</guid>
      <dc:creator>jdmwrxpower</dc:creator>
      <dc:date>2022-05-21T12:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: LISP To change text width factor inside a block that is text only?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184258#M45271</link>
      <description>&lt;P&gt;Try this. You should have posted a sample to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:BTextWidth nil
  (vlax-for b (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object))))
    (if (and (= 0 (vlax-get b 'islayout))
	     (= 0 (vlax-get b 'isxref))
	     (/= "AcDbBlockReference" (vlax-get b 'objectname))
	     )
      (vlax-for e b
	(if (and (= "AcDbText" (vlax-get e 'objectname)
		 (vlax-write-enabled-p e)
		 )
	  (vla-put-scalefactor e 1)))))
  (vla-regen doc acactiveviewport) 
  (princ)
)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 17:48:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184258#M45271</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-05-21T17:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: LISP To change text width factor inside a block that is text only?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184525#M45272</link>
      <description>&lt;P&gt;That worked perfectly, thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 17:39:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-text-width-factor-inside-a-block-that-is-text/m-p/11184525#M45272</guid>
      <dc:creator>jdmwrxpower</dc:creator>
      <dc:date>2022-05-21T17:39:40Z</dc:date>
    </item>
  </channel>
</rss>

