Author Topic: Display file path in a popup_list  (Read 8071 times)

0 Members and 1 Guest are viewing this topic.

psuchewinner

  • Guest
Display file path in a popup_list
« on: September 18, 2008, 02:15:19 PM »
I want to be able to select a drawing file in my dialog box but i dont want to use the "getfiled" (or is it findfile, idunno). Kinda like the "open" dialog.  I dont want the distraction of having another dialog box opening.  I want it all right in one dialog box.  Can this be done?

GDF

  • Water Moccasin
  • Posts: 2081
Re: Display file path in a popup_list
« Reply #1 on: September 18, 2008, 02:29:17 PM »
Try this one out...it may give you some ideals.

http://www.theswamp.org/index.php?topic=9518.0

The code for activate is by Peter Jamtgaard.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #2 on: September 19, 2008, 07:35:53 AM »
Thanks Gary, I dig into it.

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #3 on: October 02, 2008, 12:00:53 PM »
still not "getting it".
I want to be able to make a "LOOK IN:" drop down list.  So I can select a directory and store that path in a variable.  I dont want to use (Getfiled) becasue it open up another dialog box and I dont want to do it that way.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Display file path in a popup_list
« Reply #4 on: October 02, 2008, 12:05:31 PM »
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #5 on: October 02, 2008, 01:03:06 PM »
Let me clarify what I want to do.
I want to be able to browse for a file (without using "getfiled") and retrieve some xdata from it.
The dialog that I posted will have some extra stuff in it but I want to be able to get all of settings and info from 1 dialog box.

Is it possible?

What I need is some code to show a directory tree in the popup_list or list_box and the code to store it.

That is as far as I've gotten.  I wanted to start with the hardest part first.  Getting the xdata and everything else is the easy part.

Gary posted some code (above) but I cant get it to do what I want. 


GDF

  • Water Moccasin
  • Posts: 2081
Re: Display file path in a popup_list
« Reply #6 on: October 02, 2008, 01:33:41 PM »


Code: [Select]
( (lambda ( / path)
    ;; Example:
    ;; build a list of files in user selected path
    ;;
    ;; By: Se7en
    ;;         4/12/2007 12:03:11 PM
    ;;
    (defun BrowseForFolder ( / sh folder folderobject result)
      ;;
      ;; From: Tony Tanzillo
      ;; Newsgroups: autodesk.autocad.customization
      ;;
      ;; (setq folder (BrowseForFolder))
      ;;
      (vl-load-com)
      (setq sh
            (vla-getInterfaceObject
              (vlax-get-acad-object) "Shell.Application"))

      (setq folder
            (vlax-invoke-method sh 'BrowseForFolder 0 "" 0))

      (vlax-release-object sh)

      (if folder
        (progn
          (setq folderobject (vlax-get-property folder 'Self))
          (setq result (vlax-get-property FolderObject 'Path))
          (vlax-release-object folder)
          (vlax-release-object FolderObject)
          result
          )
        )
      )
    (if (null (setq path (BrowseForFolder)))
      ;; just in case you didnt specify a path
      nil
      (vl-directory-files path "*.dwg" 1))) )
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #7 on: October 02, 2008, 01:55:44 PM »
Can I add to this dialog box or inbed it into one of mine?

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Display file path in a popup_list
« Reply #8 on: October 02, 2008, 05:16:19 PM »
That is it for the browse for file/folder.  Doesn't doslib also have something similar?

Maybe OpenDCL.... James??
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #9 on: October 02, 2008, 07:27:59 PM »
Now that is COOL!  Was it created by OpenDCL or what?  Never seen a DCL file look so cool.  Very nice work.  I dont know a whole lot about it but I guess I check it out.  I'm gonna have to check out this thing called Open DCL!

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #10 on: October 02, 2008, 08:22:03 PM »
Thanks...

but was Created by the Original ObjectDCL and not OpenDCL (derivate product)
Keep smile...

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #11 on: October 03, 2008, 06:54:15 AM »
Where do we get ObjectDCL and how much does it cost?

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Display file path in a popup_list
« Reply #12 on: October 03, 2008, 07:36:45 AM »
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Display file path in a popup_list
« Reply #13 on: October 03, 2008, 07:42:59 AM »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #14 on: October 03, 2008, 08:55:32 AM »
LOL !! you'r quick guy's to answer that hein ...isn' it ?

Opendcl = Free
Derivate product of ObjectDCL

ObjectDCL = Bug Free
www.ObjectDCL.com


Keep smile...