<?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: DCL List from Image Button in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556409#M17865</link>
    <description>&lt;P&gt;just looked a little bit closer at your dcl for your list box:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        :boxed_column {
          key = "lst2";
          label = "Type";
          : list_box {
            width = 25;
            height = 10;
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;key&lt;/STRONG&gt; is in the wrong position. It should be placed under the &lt;STRONG&gt;list_box&lt;/STRONG&gt; like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        :boxed_column {
          label = "Type";
          : list_box {
            key = "lst2";
            width = 25;
            height = 10;
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 23:33:42 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2024-02-12T23:33:42Z</dc:date>
    <item>
      <title>DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12555343#M17853</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a lsp that has a quick library for our day to day block design (we constantly result in many file paths to get to these so this would save a lot of time). The issue I am running across, however is when I select an image tile, I want to have a list populated of the blocks in that category. See image below for current DCL layout.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tcoley95E9Z_0-1707751303660.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1325099iED7EAE93D6FE943E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tcoley95E9Z_0-1707751303660.png" alt="tcoley95E9Z_0-1707751303660.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Temp has no function for now and I plan on keeping it that way&lt;/P&gt;&lt;P&gt;(Yes I know its messy right now.. just a draft)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my lisp code.&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:BTools (/ Dcl_Id% Folder$ Slides@ Slide1$ Slide2$ Slide3$ Slide4$ Return$ X# Y#)
  
  (princ "\nBTOOLS")(princ)
  
  ; Set Default Variables
  (setq Slides@ (list nil "Block Design" "Paper Space" "Plumbing" "WIP") ;; NAME OF THE .SLD FILE
        Slide1$ (nth 1 Slides@)
        Slide2$ (nth 2 Slides@)
        Slide3$ (nth 3 Slides@)
        Slide4$ (nth 4 Slides@)
        Folder$ "C:\\...\\...\\Documents\\"
        Return$ ""
  );setq
  
  ; Load Dialog
  (setq Dcl_Id% (load_dialog "MyDialogs.dcl"))
  (new_dialog "MySlideImages" Dcl_Id%)
  
  ; Set Dialog Initial Settings
  (set_tile "Title" " BTOOLS - TOOLS FOR DRAFTING")
  (set_tile "Text1" Slide1$)
  (set_tile "Text2" Slide2$)
  (set_tile "Text3" Slide3$)
  (set_tile "Text4" Slide4$)
  
  ; Adjust X# and Y# per image_buttom outline to fit slide_image
  (start_image "Slide1")(setq X# (- (dimx_tile "Slide1") 2))
  (setq Y# (- (dimy_tile "Slide1") 2))(end_image)
  (start_image "Slide1")(slide_image -5 -4 X# Y# (strcat Folder$ Slide1$))(end_image)
  (start_image "Slide2")(slide_image 1 1 X# Y# (strcat Folder$ Slide2$))(end_image)
  (start_image "Slide3")(slide_image 1 1 X# Y# (strcat Folder$ Slide3$))(end_image)
  (start_image "Slide4")(slide_image 1 1 X# Y# (strcat Folder$ Slide4$))(end_image)
  
  ; Dialog Actions
  (action_tile "Slide1" "(setq Return$ Slide1$)")
  (action_tile "Slide2" "(setq Return$ Slide2$)")
  (action_tile "Slide3" "(setq Return$ Slide3$)")
  (action_tile "Slide4" "(setq Return$ Slide4$)")
  (start_dialog)
  
  ; Unload Dialog
  (unload_dialog Dcl_Id%)
  (princ (strcat "\n" Return$))
  (princ)
  
)&lt;/LI-CODE&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>Mon, 12 Feb 2024 20:13:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12555343#M17853</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T20:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12555695#M17854</link>
      <description>&lt;P&gt;Looks like a good start. Please also post your dcl so will know list box key&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Where’s location of blocks?&lt;/P&gt;&lt;P&gt;Hopefully they’re in separate folders under:&lt;/P&gt;&lt;PRE&gt;"C:\\...\\...\\Documents\\"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 17:38:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12555695#M17854</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T17:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556018#M17855</link>
      <description>&lt;P&gt;Blocks location are currently in that folder path you listed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the DCL.. It's pretty messy right now, cleanup for me is fine I'd just rather be able to get this problem solved before cleaning it up&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;MySlideImages : dialog {

  key = "Title";
  width = 60;
  height = 25;
  label = "";//Title$ from lsp file


// Where images go
  : boxed_column{
    key = "lst1";
    label = "Category";
    : column {
      : row {
        : image_button {
          key = "Slide1";
          width = 17.26;
          height = 5.28;
          aspect_ratio = 1;
          color = -2;
        }
        : image_button {
          key = "Slide2";
          width = 17.26;
          height = 5.28;
          aspect_ratio = 1;
          color = -2;
        }
        : image_button {
          key = "Slide3";
          width = 17.26;
          height = 5.28;
          aspect_ratio = 1;
          color = -2;
        }
        // : image_button {
        //   key = "Slide4";
        //   width = 17.26;
        //   height = 5.28;
        //   aspect_ratio = 1;
        //   color = -2;
        // }
      } //Top images

      : row {
        : column {
          : text {
            key = "Text1";
            label = "";//Text1$ from lsp file
            width = 17.26;
            fixed_width = true;
            alignment = centered;
          }
        }
        : column {
          : text {
            key = "Text2";
            label = "";//Text2$ from lsp file
            width = 17.26;
            fixed_width = true;
            alignment = centered;
          }
        }
        : column {
          : text {
            key = "Text3";
            label = "";//Text3$ from lsp file
            width = 17.26;
            fixed_width = true;
            alignment = centered;
          }
        }
      } //Top text callouts
    }
  }

  : row{
        :boxed_column {
          key = "lst2";
          label = "Type";
          : list_box {
            width = 25;
            height = 10;
          }
        }

         : column{
          : boxed_column{
            label = " Temp ";
          }
          spacer;
          : row{
            ok_cancel;
          } 
        }
        
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:13:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556018#M17855</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T20:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556047#M17856</link>
      <description>&lt;P&gt;Thanks for sharing your dcl. I can see now your list box key&lt;/P&gt;&lt;PRE&gt;key = "lst2"&lt;/PRE&gt;&lt;P&gt;Now I’m assuming when you say blocks these are individual drawings. It would be a lot easier if each categories of blocks are in their separate subfolders. Now when you click on the slide then the action callback can run the vl-directory-files function to get a list of dwgs in a specifed folder which returns a list for you to populate the list box&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2024/PTB/?guid=GUID-C28C0CB0-FBBE-4AA8-BAC4-2FF222772514" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/OARX/2024/PTB/?guid=GUID-C28C0CB0-FBBE-4AA8-BAC4-2FF222772514&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:22:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556047#M17856</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T20:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556102#M17857</link>
      <description>Thanks! I'll give it a try here soon and update you on it.</description>
      <pubDate>Mon, 12 Feb 2024 20:47:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556102#M17857</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T20:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556125#M17858</link>
      <description>&lt;P&gt;Great then you can use the functions shown here to populate:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;"lst2"&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-9C5213CA-B349-4F08-A6B8-960BC3BCFC84" target="_blank"&gt;https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-9C5213CA-B349-4F08-A6B8-960BC3BCFC84&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:55:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556125#M17858</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T20:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556145#M17859</link>
      <description>Hey I'm really new to handling Image Buttons.. how do I have my image button be updated the second someone were to click on it.. not clicking on it then hitting 'ok'?</description>
      <pubDate>Mon, 12 Feb 2024 21:04:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556145#M17859</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T21:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556238#M17860</link>
      <description>^^^^ My biggest issue right now is I am able to store a variable for the selected image title but only after I click "OK".&lt;BR /&gt;This part of the code: "(princ (strcat "\n" Return$))" (Line 43)&lt;BR /&gt;But I want this variable to be updated when I just simply click on an image tile, not click THEN click OK. Then I would be able to have my list be populated utilizing vl-directory-files.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 12 Feb 2024 21:49:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556238#M17860</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T21:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556240#M17861</link>
      <description>&lt;P&gt;I'm not sure I understand what you're saying.&lt;/P&gt;&lt;P&gt;I thought your idea was to have the 3 images representing the 3 categories up top and those images don't change but they're just representational. Then when one of those categories are selected the list box will then show all the drawings for that category for selection and maybe when a drawing is selected and OK button is clicked then it'll Insert that block into the current drawing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1707773941745.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1325318i1515A84AD8E73832/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paullimapa_0-1707773941745.png" alt="paullimapa_0-1707773941745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But if you want to select the Block in the list box and then have the slide image to now show a preview of that Block that cannot be done. You would have to first open up each drawing/Block &amp;amp; make a slide of the drawing/Block and then include in the code to update the slide to now show at top. You might as well use the built-in Design Center DC app to do this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_1-1707774577647.png" style="width: 749px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1325323iDA7672362630379C/image-dimensions/749x324?v=v2" width="749" height="324" role="button" title="paullimapa_1-1707774577647.png" alt="paullimapa_1-1707774577647.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 21:49:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556240#M17861</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T21:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556250#M17862</link>
      <description>I apologize for any confusion.. yes the first image is correct. They are just categories for different blocks in each respective subfolder named "Block Design" "Paper Space" and "Plumbing". I just dont know how to have the list of blocks in the subfolders instantly populate when I click one of the categories.. not after I click THEN press okay.. does that make sense? Sorry its a bit confusing lol</description>
      <pubDate>Mon, 12 Feb 2024 21:56:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556250#M17862</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-12T21:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556267#M17863</link>
      <description>&lt;P&gt;What made you thought of &lt;STRONG&gt;only&lt;/STRONG&gt; storing the variable Return$ in the action call back:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "Slide1" "(setq Return$ Slide1$)")&lt;/LI-CODE&gt;&lt;P&gt;Now that you know about the&amp;nbsp;&lt;SPAN&gt;vl-directory-files function why don't you just define a function that calls vl-directory-files based on the slide image selected to list the drawings in that category like I mentioned which returns a list for you to then populate the list box:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "Slide1" "(do_listbox $key)")&lt;/LI-CODE&gt;&lt;P&gt;So now when "Slide1" is selected a separate function defined as do_listbox runs. The $key which = "Slide1" is passed as an argument so the do_listbox function will know which directory to return the list:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; do_listbox
; Argument:
; slide-category = folder location to list blocks
; Returns:
; list of drawings in that folder location
(defun do_listbox (slide-category)
 (cond
   ((eq slide-category "Slide1")
     (vl-directory-files (strcat Folder$ Slide1$) "*.dwg")
   )
   ((eq slide-category "Slide2")
     (vl-directory-files (strcat Folder$ Slide2$) "*.dwg")
   )
   ((eq slide-category "Slide3")
     (vl-directory-files (strcat Folder$ Slide3$) "*.dwg")
   )
   ((eq slide-category "Slide4")
     (vl-directory-files (strcat Folder$ Slide4$) "*.dwg")
   )
 )
; return result as a list of drawings
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:03:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556267#M17863</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T22:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556279#M17864</link>
      <description>&lt;P&gt;actually to make it even easier just change the following action calls from:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  ; Dialog Actions
  (action_tile "Slide1" "(setq Return$ Slide1$)")
  (action_tile "Slide2" "(setq Return$ Slide2$)")
  (action_tile "Slide3" "(setq Return$ Slide3$)")
  (action_tile "Slide4" "(setq Return$ Slide4$)")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  ; Dialog Actions
  (action_tile "Slide1" "(setq filelist(vl-directory-files (strcat Folder$ Slide1$) \"*.dwg\"))")
  (action_tile "Slide2" "(setq filelist(vl-directory-files (strcat Folder$ Slide2$) \"*.dwg\"))")
  (action_tile "Slide3" "(setq filelist(vl-directory-files (strcat Folder$ Slide3$) \"*.dwg\"))")
  (action_tile "Slide4" "(setq filelist(vl-directory-files (strcat Folder$ Slide4$) \"*.dwg\"))")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you can even include following the vl-directory files function call with the function I posted earlier on populating the list box...see if you can figure how to do that&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:09:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556279#M17864</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T22:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556409#M17865</link>
      <description>&lt;P&gt;just looked a little bit closer at your dcl for your list box:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        :boxed_column {
          key = "lst2";
          label = "Type";
          : list_box {
            width = 25;
            height = 10;
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;key&lt;/STRONG&gt; is in the wrong position. It should be placed under the &lt;STRONG&gt;list_box&lt;/STRONG&gt; like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        :boxed_column {
          label = "Type";
          : list_box {
            key = "lst2";
            width = 25;
            height = 10;
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 23:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12556409#M17865</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-12T23:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557834#M17866</link>
      <description>Hey Paul,&lt;BR /&gt;I really appreciate your patience with me through this. I tried implementing that above function and it does return the files but only after I press 'OK'. I am pretty lost in having the list_box automatically populate when one image_button is simply pressed once.</description>
      <pubDate>Tue, 13 Feb 2024 16:05:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557834#M17866</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-13T16:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557867#M17867</link>
      <description>&lt;P&gt;take a look at what I did with the attached.&lt;/P&gt;&lt;P&gt;1. I changed location of My Documents so not sure if that matches yours:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;        Folder$ "C:\\...\\...\\Documents\\"
        Folder$ (strcat(getenv"userprofile")"\\Documents\\")&lt;/LI-CODE&gt;&lt;P&gt;I added this function which populates the list box with the filelist:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; do_lstbox populates list box with filelist &amp;amp; select first item
 (defun do_lstbox ()
  (start_list "lst2" 3)    ; Start population of the list box 
  (mapcar 'add_list filelist) ; add items from the list
  (end_list)               ; end population
  (setq selection "0")     ; set default selection value
  (set_tile "lst2" selection) ; highlight first item in list box
 )  &lt;/LI-CODE&gt;&lt;P&gt;These are the actions I'm using when you click on the dcl:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; Dialog Actions
  (action_tile "Slide1" "(setq filelist(vl-directory-files (setq Return$ (strcat Folder$ Slide1$)) \"*.dwg\"))(do_lstbox)")
  (action_tile "Slide2" "(setq filelist(vl-directory-files (setq Return$ (strcat Folder$ Slide2$)) \"*.dwg\"))(do_lstbox)")
  (action_tile "Slide3" "(setq filelist(vl-directory-files (setq Return$ (strcat Folder$ Slide3$)) \"*.dwg\"))(do_lstbox)")
  (action_tile "Slide4" "(setq filelist(vl-directory-files (setq Return$ (strcat Folder$ Slide4$)) \"*.dwg\"))(do_lstbox)")
  (action_tile "accept" "(setq selection (get_tile \"lst2\"))(done_dialog 1)") ; get latest item selected in list box then close dcl
  (action_tile "cancel" "(done_dialog 0)") ; cancel dcl&lt;/LI-CODE&gt;&lt;P&gt;When the dialog starts I also added this variable:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; Start dialog
  (setq stid (start_dialog)) &lt;/LI-CODE&gt;&lt;P&gt;This way when the dialog closes I can check what to do:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; check if accept or cancel button selected to close dialog
  (if(not (zerop stid)) 
    (progn ; then ok button selected
     (setq blkfile (strcat Return$ "\\" (nth (atoi selection) filelist)))
     (alert(strcat"Item Selected is: " selection "\nBlock File is " blkfile))
    )
    ; else cancel button selected
    (alert"Function Cancelled")
  )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:16:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557867#M17867</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-13T16:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557892#M17868</link>
      <description>Thanks! I think the issue I'm arriving at right now is that within my documents folder, I have subfolders that are named the same as each category (Block Design folder, Paper Space folder, etc.) because I don't want all the blocks to show up at once, just the ones in the category. How would I be able to have the filelist show these subfolders? For example, if I hit 'Block Design' I would want to list all the blocks in&lt;BR /&gt;"C:\...\Documents\Block Design"</description>
      <pubDate>Tue, 13 Feb 2024 16:26:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557892#M17868</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-13T16:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557897#M17869</link>
      <description>&lt;P&gt;That’s what the code I posted would do&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"(setq filelist(vl-directory-files (setq Return$ (strcat Folder$ Slide1$)) \"*.dwg\"))&lt;/PRE&gt;&lt;P&gt;This only shows dwg files under that folder&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:28:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557897#M17869</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-13T16:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557904#M17870</link>
      <description>&lt;P&gt;Huh thats weird.. It doesnt populate for me. Here is my folder structure if this helps.&lt;/P&gt;&lt;P&gt;Ignore 'Paper Space2' it is not being used.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tcoley95E9Z_0-1707841935011.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1325647i2F58D5D4877252CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tcoley95E9Z_0-1707841935011.png" alt="tcoley95E9Z_0-1707841935011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:32:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557904#M17870</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-13T16:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557911#M17871</link>
      <description>Never mind It populated! I have no clue why it didnt at first. Thank you so much Paul!&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557911#M17871</guid>
      <dc:creator>tcoley95E9Z</dc:creator>
      <dc:date>2024-02-13T16:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: DCL List from Image Button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557940#M17872</link>
      <description>&lt;P&gt;glad that it finally worked for you...now if you want this to work for everyone in the office you'll have to change the folder locations to a common area where those library of drawings reside...cheers!!!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:43:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-list-from-image-button/m-p/12557940#M17872</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-13T16:43:47Z</dc:date>
    </item>
  </channel>
</rss>

