<?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: edit attribute definitions of all blocks in a drawing in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380086#M25549</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;thanks for your questions.&lt;/P&gt;&lt;P&gt;I'n not sure what you mean by the last of the 3 questions/statements you made.&lt;/P&gt;&lt;P&gt;I hardly use Acad any more so don't know what it can/will do.&lt;/P&gt;&lt;P&gt;Anyways, I just export out of Inventor to DXF with all the settings that Inventor is able to do (which isn't much!).&lt;/P&gt;&lt;P&gt;Then I open the DXF in Acad and process it so it's good enough for sending to the steel mill for processing.&lt;/P&gt;&lt;P&gt;When it comes into Acad with the fonts all expanded over top of eachother, and them all blocked up, it's a royal PITA to fix, and a colossal waste of time.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 22:12:33 GMT</pubDate>
    <dc:creator>cadman777</dc:creator>
    <dc:date>2023-11-15T22:12:33Z</dc:date>
    <item>
      <title>edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379697#M25545</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Today I have a challenge that I need help solving.&lt;/P&gt;&lt;P&gt;When Inventor exports to DXF, the fonts export as blocks (fonts inside blocks).&lt;/P&gt;&lt;P&gt;Also, the font text is txt.shx.&lt;/P&gt;&lt;P&gt;The titleblock exports with the attributes definitions having the font txt.shx.&lt;/P&gt;&lt;P&gt;The main thing I want to do at this point is to:&lt;/P&gt;&lt;P&gt;1. change all the attribute definitions' properties in the titleblock to be .75 width&lt;/P&gt;&lt;P&gt;2. change all the text width in all the blocks to .75.&lt;/P&gt;&lt;P&gt;Is there an easy way to do this?&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 19:02:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379697#M25545</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-15T19:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379726#M25546</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/88249"&gt;@cadman777&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Today I have a challenge that I need help solving.&lt;/P&gt;
&lt;P&gt;When Inventor exports to DXF, the fonts export as blocks (fonts inside blocks).&lt;/P&gt;
&lt;P&gt;Also, the font text is txt.shx.&lt;/P&gt;
&lt;P&gt;The titleblock exports with the attributes definitions having the font txt.shx.&lt;/P&gt;
&lt;P&gt;The main thing I want to do at this point is to:&lt;/P&gt;
&lt;P&gt;1. change all the attribute definitions' properties in the titleblock to be .75 width&lt;/P&gt;
&lt;P&gt;2. change all the text width in all the blocks to .75.&lt;/P&gt;
&lt;P&gt;Is there an easy way to do this?&lt;/P&gt;
&lt;P&gt;Thanks...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you asking over here to get INVENTOR forum to do all of this at export time?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are you wanting AutoCAD to open those DXF files all the time with your parameters, regardless of whether you save or not?&lt;BR /&gt;&lt;BR /&gt;Or are you wanting to import the DXF files into AutoCAD, saveas to DWG, and make all of these changes in an automatic way like the way INSERT command would do with your DXF(s) when going into a template with all of the STYLE settings you asked about for example?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 19:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379726#M25546</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-11-15T19:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379963#M25547</link>
      <description>&lt;P&gt;if you're referring to making the width factor changes to the Title Block Attributes when opened in AutoCAD, here's a lisp routine &lt;STRONG&gt;UpdAttWid&lt;/STRONG&gt; to take care of that (change wdf 0.75 to a different value as needed):&lt;/P&gt;&lt;P&gt;(To load: Save as&amp;nbsp;&lt;STRONG&gt;UpdAttWid.lsp, &lt;/STRONG&gt;drag+drop file onto &lt;STRONG&gt;AutoCAD's &lt;/STRONG&gt;drawing area, enter at the command line: &lt;STRONG&gt;UpdAttWid&lt;/STRONG&gt;)&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; UpdAttWid update attbribute width factor within blocks
; OP:
; https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379697/thread-id/1119339
(defun c:UpdAttWid (/ lst ttb wdf)
 (setq wdf 0.75) ; change width factor value as needed
 (vl-load-com)
 (while (not ttb)
  (princ"\nSelect Block with Attributes to Change Width Factors:")
  (if (setq ttb (ssget "_+.:E:S" (list '(0 . "INSERT") '(66 . 1))))
   (progn 
    (setq lst (vlax-invoke (vlax-ename-&amp;gt;vla-object (ssname ttb 0)) 'getAttributes)
          len (length lst)
    )
    (foreach attobj lst
     (if (vlax-property-available-p attobj "ScaleFactor") (vla-put-scalefactor attobj wdf))
    )
    (princ(strcat"\nFound &amp;amp; Updated Total of [" (itoa len) "] Attributes' Width Factor to: [" (rtos wdf 2 2) "]."))
   )
   (princ"\nNo Blocks with Attributes Selected...")
  ) ; if
 ) ; while
 (princ)
) ; defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 21:06:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379963#M25547</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-11-15T21:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380060#M25548</link>
      <description>&lt;P&gt;if you're referring to making the width factor changes to the Texts inside Blocks when opened in AutoCAD, here's a lisp routine&amp;nbsp;&lt;STRONG&gt;UpdBlkTxtWid&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to take care of that (change wdf 0.75 to a different value as needed):&lt;/P&gt;&lt;P&gt;(To load: Save as&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;UpdBlkTxtWid&lt;/SPAN&gt;.lsp,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;drag+drop file onto&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AutoCAD's&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;drawing area, enter at the command line:&lt;SPAN&gt; &lt;STRONG&gt;UpdBlkTxtWid&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; UpdBlkTxtWid update Text width factor within Blocks
; OP:
; https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12379697/thread-id/1119339
(defun c:UpdBlkTxtWid (/ blks doc count len wdf)
 (setq doc (vla-get-activedocument (vlax-get-acad-object)) count 0 len 0 wdf 0.75) ; change width factor value as needed
 (vl-load-com)
 (if (setq blks (vla-get-blocks doc)) ; get collection of block table (vla-get-count blks) = total collection
  (progn
   (vlax-for n blks ; cycl through collection
    (if (and
         (= (vla-get-IsLayout n) :vlax-false) ; don't include layout/model
         (= (vla-get-isxref n) :vlax-false) ; don't include xrefs
        )
     (progn
      (setq count (1+ count)) ; add to # of actual blocks
      (vlax-for m n
       (if (member (vla-get-objectname m) '("AcDbText"))
        (if (and 
             (vlax-property-available-p m "ScaleFactor")
             (/= wdf (vla-get-scalefactor m)) 
            ) 
         (progn
          (vla-put-scalefactor m wdf)
          (setq len (1+ len))
         ) ; progn
        ) ; if width factor
       ) ; if text
      ) ; vlax-for items within block
     ) ; progn
    ) ; if
   ) ; vlax-for blocks
   (vla-regen doc acallviewports)
   (princ(strcat"\nFound [" (itoa count) "] Blocks &amp;amp; Updated Total of [" (itoa len) "] Texts' Width Factor to: [" (rtos wdf 2 2) "]."))
  ) ; progn
  (princ"\nNo Blocks Found in Drawing.")
 ) ; if
 (princ)
) ; defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 21:59:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380060#M25548</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-11-15T21:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380086#M25549</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;thanks for your questions.&lt;/P&gt;&lt;P&gt;I'n not sure what you mean by the last of the 3 questions/statements you made.&lt;/P&gt;&lt;P&gt;I hardly use Acad any more so don't know what it can/will do.&lt;/P&gt;&lt;P&gt;Anyways, I just export out of Inventor to DXF with all the settings that Inventor is able to do (which isn't much!).&lt;/P&gt;&lt;P&gt;Then I open the DXF in Acad and process it so it's good enough for sending to the steel mill for processing.&lt;/P&gt;&lt;P&gt;When it comes into Acad with the fonts all expanded over top of eachother, and them all blocked up, it's a royal PITA to fix, and a colossal waste of time.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380086#M25549</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-15T22:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380088#M25550</link>
      <description>&lt;P&gt;Hey Paul,&lt;/P&gt;&lt;P&gt;You got it (both things)!&lt;/P&gt;&lt;P&gt;Thanks for posting your 2 LISP routines!&lt;/P&gt;&lt;P&gt;I'll try them tomorrow when I go back to work.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:14:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380088#M25550</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-15T22:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380092#M25551</link>
      <description>&lt;P&gt;Hope they work out for you…cheers!!!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:15:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380092#M25551</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-11-15T22:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380107#M25552</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/88249"&gt;@cadman777&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;thanks for your questions.&lt;/P&gt;
&lt;P&gt;I'n not sure what you mean by the last of the 3 questions/statements you made.&lt;/P&gt;
&lt;P&gt;I hardly use Acad any more so don't know what it can/will do.&lt;/P&gt;
&lt;P&gt;Anyways, I just export out of Inventor to DXF with all the settings that Inventor is able to do (which isn't much!).&lt;/P&gt;
&lt;P&gt;Then I open the DXF in Acad and process it so it's good enough for sending to the steel mill for processing.&lt;/P&gt;
&lt;P&gt;When it comes into Acad with the fonts all expanded over top of eachother, and them all blocked up, it's a royal PITA to fix, and a colossal waste of time.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So there is what we regular users call the "golden rule": content already in a DWG file will replace the same named content coming in with another outside file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working with that... you create a one-time AutoCAD Template file (DWT extension, once created it never gets overwritten), inside it you set STYLE command styles your Inventor exports DWG files with to the settings you want.&lt;/P&gt;
&lt;P&gt;So INVENTOR create a text style called BUBBA.&lt;/P&gt;
&lt;P&gt;In your template, you will create a font style(s), using STYLE command, called BUBBA with the font you want, the font settings you want (width etc.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_0-1700086850725.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1293470iFA25EB31CAE76315/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_0-1700086850725.png" alt="pendean_0-1700086850725.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you INSERT your DXF file into it, all fonts using the style name BUBBA will change in appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAVEAS your DXF to with as you wish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:23:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380107#M25552</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-11-15T22:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380302#M25553</link>
      <description>&lt;P&gt;My template is a dwg file, not a dwt file.&lt;/P&gt;&lt;P&gt;Just tried it your way and made no difference.&lt;/P&gt;&lt;P&gt;Is it possible that the path is required to be the default install path for that Template file?&lt;/P&gt;&lt;P&gt;Mine is in a custome folder on another drive.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 00:09:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12380302#M25553</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-16T00:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12383110#M25554</link>
      <description>&lt;P&gt;Thanks so much for these LISP routines!&lt;/P&gt;&lt;P&gt;They work like a charm.&lt;/P&gt;&lt;P&gt;When they run, they're &lt;EM&gt;instant&lt;/EM&gt;, BAM!&lt;/P&gt;&lt;P&gt;I sure wish I had your coding skills.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 02:58:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12383110#M25554</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-17T02:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: edit attribute definitions of all blocks in a drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12383122#M25555</link>
      <description>&lt;P&gt;Glad to have helped…cheers!!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 03:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/edit-attribute-definitions-of-all-blocks-in-a-drawing/m-p/12383122#M25555</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-11-17T03:13:54Z</dc:date>
    </item>
  </channel>
</rss>

