<?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 Attribute Extraction Assistance in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764731#M165825</link>
    <description>&lt;P&gt;see attached lisp files&lt;/P&gt;</description>
    <pubDate>Wed, 13 Aug 2025 15:36:58 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2025-08-13T15:36:58Z</dc:date>
    <item>
      <title>LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13763852#M165803</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I could really use some help with a LISP that I'm trying to write. I need to speed up my plotting, and I want to plot PDF's with filenames derived from attributes in the titleblock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've managed to get the lisp cycling through the layouts and plotting each correctly, but despite my best efforts I cannot extract the attribute information. I've tried Lee-Mac's examples, and countless others....but the results continue to elude me. I just don't understand the syntax enough/correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone could help out I'd very much appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Info:&lt;/P&gt;&lt;P&gt;I have multiple (number varies) paperspace layouts within a drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each layout has a titleblock called "Title" containing a number of attributes (the titleblock name and tag names are fixed and never change).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract four of the attributes (lets call them A, B, C and D) and use them for the filename of the PDF, which needs to be in the format "A - B - C - D".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to cycle through the layouts, plotting a PDF for each.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below is what I have so far. It works fine, but I just need to get "pdfname = A - B - C - D" populated with the attributes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:PlotAllSheets ()				;LISP name
  (foreach lay (layoutlist)				;Cycle through all layouts

  pdfname = A - B - C - D

  (setvar 'CTab lay)
  (COMMAND 	"-PLOT"					;Invoke plot command
	"Y"						;Detailed plot configuration?
	""						;Layout name
	"AutoCAD PDF (General Documentation).pc3"	;Output device
	"ISO Full Bleed A1 (841.00 x 594.00 MM)"	;Paper size 
	"M"						;Paper units
	"L"						;Drawing orientation
	"N"						;Upside down
	"W"						;Window
	"1.1638,568.0192"				;Window start coordinates
	"823.2229,-11.1902"				;Window end coordinates
	"1:1"						;Plot scale
	"C"						;Center
	"N"						;Plot with plot style
	"monochrome.ctb"				;Plot style
	"Y"						;Plot line weights
	"N"						;Plot line scaling
	"N"						;Paper space first
	"N"						;Hide? 
	pdfname						;Name of file
	"N"						;Directory to save
	"y")						;Save changes to page setup
  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/86251"&gt;@patrick_35&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 10:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13763852#M165803</guid>
      <dc:creator>carl_swanGU3NV</dc:creator>
      <dc:date>2025-08-12T10:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764066#M165814</link>
      <description>&lt;P&gt;Can you post a sample drawing? Preferably, a drawing with a title block that includes attributes.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 12:47:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764066#M165814</guid>
      <dc:creator>kajanthangavel</dc:creator>
      <dc:date>2025-08-12T12:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764087#M165815</link>
      <description>&lt;P&gt;Please provide sample dwg with the title block and the attribute tag names you want to extract&amp;nbsp;&lt;SPAN&gt;A, B, C and D&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 12:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764087#M165815</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-08-12T12:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764118#M165816</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6662555"&gt;@kajanthangavel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for taking the time to look into this for me, it's very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a template, but I've stripped out everything else other than the attributes required (there are more attributes in the titleblock, but&amp;nbsp;I need to keep the file confidential).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The naming convention for the PDF's needs to be "Drawing Number - REV - ID - Description Top - Description bottom". The space either side of the hyphen is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 13:17:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764118#M165816</guid>
      <dc:creator>carl_swanGU3NV</dc:creator>
      <dc:date>2025-08-12T13:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764215#M165818</link>
      <description>&lt;P&gt;Try the attached revised lisp.&lt;/P&gt;&lt;P&gt;Basically I added the following:&lt;/P&gt;&lt;P&gt;1) Localized variables:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  (/ blkname dwgprefix dwgname en pdfname ss) ; localize variables&lt;/LI-CODE&gt;&lt;P&gt;2)&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  ; set blkname, separator &amp;amp; tagnames
  (setq blkname "Titleblock"
        sep " - "
        taga "DRAWING-NUMBER"
        tagb "REV"
        tagc "J-NUM"
        tagd "DESCRIPTION-TOP"
        tage "DESCRIPTION-BOT"
        dwgprefix (getvar "dwgprefix") 
        dwgname (vl-filename-base (getvar "dwgname"))
  )&lt;/LI-CODE&gt;&lt;P&gt;3)&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;   ; find block in layout &amp;amp; get pdfname
  (if (setq ss (ssget "_X" (list '(0 . "Insert") '(66 . 1) (cons 2 blkname) (cons 410 lay))))
    (setq ; then if found
      en (ssname ss 0)  ; get entity name
      pdfname ;  pdfname = A - B - C - D
       (strcat
         dwgprefix 
         (getpropertyvalue en taga) 
         sep 
         (getpropertyvalue en tagb) 
         sep 
         (getpropertyvalue en tagc) 
         sep 
         (getpropertyvalue en tagd) 
         sep 
         (getpropertyvalue en tage) 
         ".pdf"
       )
    ) ; setq       
    (setq pdfname (strcat dwgprefix dwgname sep lay ".pdf")) ; else when no blk found in layout
  ) ; if&lt;/LI-CODE&gt;&lt;P&gt;4) Don't need to set layout current since response can be placed inside Plot sequence:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;  (setvar 'CTab lay)
  (COMMAND 	"-PLOT"					;Invoke plot command
	"Y"						;Detailed plot configuration?
  lay           ;Layout name
;	""						;Layout name&lt;/LI-CODE&gt;&lt;P&gt;5)&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  (princ) ; clean exit
) ; defun&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Aug 2025 14:12:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764215#M165818</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-08-12T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764677#M165822</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is amazing thank you so much for taking the time to help me!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's 99% there, I just need one small change, which is the hyphen between description top and description bottom. Could you please remove the hyphen and just make it a simple space between these two attributes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if it's not too much trouble, are you able to create another version of it that just plots the layout that's currently active, rather than all of them? I can see it being very useful and I hadn't thought of it up until now. I'm assuming that it's simply the removal of line 18 (I'm trying to understand you're code but it's significantly above my understanding and I don't want to butcher your hard work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 18:42:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764677#M165822</guid>
      <dc:creator>carl_swanGU3NV</dc:creator>
      <dc:date>2025-08-12T18:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764731#M165825</link>
      <description>&lt;P&gt;see attached lisp files&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 15:36:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13764731#M165825</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-08-13T15:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: LISP Attribute Extraction Assistance</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13765015#M165830</link>
      <description>&lt;P&gt;Another but needs title block to be of a fixed name and also at 0,0. It allows you to select a range of layouts as you mentioned not plot all, Put in 1 then 99 as last will plot all. You will need to edit to suit your request.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1755046130349.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1560748i20ABAAC560FF02EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1755046130349.png" alt="SeaHaven_0-1755046130349.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 00:50:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-attribute-extraction-assistance/m-p/13765015#M165830</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-08-13T00:50:17Z</dc:date>
    </item>
  </channel>
</rss>

