Author Topic: Display file path in a popup_list  (Read 8056 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...

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Display file path in a popup_list
« Reply #15 on: October 03, 2008, 08:59:31 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

Got git 'im James!  I see you lurking around here.   :wink:


From my experience, OpenDCL has NOT had anything that I would consider a BUG.  And with Owen always monitoring the OpenDCL forums, any "bugs" that have been posted have been quickly fixed/updated/modified in the next release.  Owen's turn-around time is incredibily fast!
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #16 on: October 03, 2008, 09:06:41 AM »
Maybe, bugs are fixed each time...
but still have bugs...
« Last Edit: October 03, 2008, 09:13:54 AM by Andrea »
Keep smile...

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Display file path in a popup_list
« Reply #17 on: October 03, 2008, 09:11:38 AM »
First of all, it's not my job to test the software to make sure it works.  Secondly, I haven't experienced anything I would consider a bug.  The two or three things that I've had issues with were "as-designed" and just required a slight change in my thinking.

So enlighten us... what have you come across in OpenDCL that is a bug in your extensive testing?
And just out of curiosity, how many seats of ObjectDCL have you sold?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #18 on: October 03, 2008, 09:21:55 AM »
First of all, it's not my job to test the software to make sure it works. 
maybe you shoud be...?

Secondly, I haven't experienced anything I would consider a bug.
(see your first thing).

The two or three things that I've had issues with were "as-designed" and just required a slight change in my thinking.
That exacly what i've say....still have bugs.

So enlighten us... what have you come across in OpenDCL that is a bug in your extensive testing?
Don't worry, I dowload each release of it...and test it all.

And just out of curiosity, how many seats of ObjectDCL have you sold?
anough don't worry about that..  ;-)
Keep smile...

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Display file path in a popup_list
« Reply #19 on: October 03, 2008, 09:24:15 AM »
Congratulations!!  You've successfully dodged all of my questions!  Well done!
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Display file path in a popup_list
« Reply #20 on: October 03, 2008, 09:36:16 AM »
Let's not turn this into a war folks. It's easy to be passionate and defensive about the software you use or are associated with. Let's leave it at that. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Display file path in a popup_list
« Reply #21 on: October 03, 2008, 09:37:30 AM »
Let's not turn this into a war folks.
Who's turning this into a "war"?  I've simply stated that the answers to my questions were vague at best.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Display file path in a popup_list
« Reply #22 on: October 03, 2008, 09:40:04 AM »
I'm just saying these things can escalate quickly, let's not. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #23 on: October 03, 2008, 09:50:49 AM »
don't worry ..i'm a good player.. ;)

and thanks for your supervision.   ^-^
Keep smile...

psuchewinner

  • Guest
Re: Display file path in a popup_list
« Reply #24 on: October 03, 2008, 10:06:54 AM »
The response that Andrea gave me was just the kind of spark that I needed.  Now I will investigate Open/ObjectDCL further.  Thanks Andrea for providing such an awesome example of what can be done with these two add-ons.  It has definately sparked my interest and given me motivation to learn something new.  I wondered when something would happen along and expand the horizons of AutoCAD customization.

I am still excited about what can be done.  Guess I am easily amused. :lol:

As always, thanks everybody for your help.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display file path in a popup_list
« Reply #25 on: October 03, 2008, 10:12:18 AM »
it's a pleasure.... 8-)
Keep smile...

Spike Wilbury

  • Guest
Re: Display file path in a popup_list
« Reply #26 on: October 03, 2008, 10:40:55 AM »
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!

If you are refering to the sample provided by Gary, ... the code inside of BrowseForFolder() does that for you (via Activex).

For that look into the Visual Lisp Help == vla-getInterfaceObject

Spike Wilbury

  • Guest
Re: Display file path in a popup_list
« Reply #27 on: October 03, 2008, 10:57:28 AM »
And here it is another option:

Common Dialogs - OpenSave & BrowseForFolder

http://www.theswamp.org/index.php?topic=9441.msg132790#msg132790

See if fit your needs.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Display file path in a popup_list
« Reply #28 on: October 03, 2008, 11:24:56 AM »
Quote
Go git 'im James!  I see you lurking around here.

If any of you know the History of ObjectDCL and OpenDCL you'll give Andrea a little slack.  I would call foul if OpenDCL was Andrea's direct competitor, however, because it's free it really can't be considered "competitive". 

With ObjectDCL you pay for continued support of the version purchased.  With OpenDCL that support could evaporate at anytime (I'm not, like, saying Owen would spontaneously evaporate, but, heck you never know.) 

I personally don't have a problem using the free version.  The source code is available for download so if there was any evaporation, spontaneously or otherwise, I could always hire a programmer to edit and compile.

I have my own business, so I can understand Andrea's position.

James Buzbee
Windows 8

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Display file path in a popup_list
« Reply #29 on: October 03, 2008, 12:40:32 PM »
I did not think there was such a thing as "Bug-Free" software?  :-D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Display file path in a popup_list
« Reply #30 on: October 03, 2008, 12:43:32 PM »
Apparently there is  :lmao:  But you are going to have to pay for it  :-P
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Sebb77

  • Guest
Re: Display file path in a popup_list
« Reply #31 on: October 03, 2008, 03:11:36 PM »
Here i go with my first post. Let me say most of you seem like IT magicians to me. I just hope i will be able to help people here in the near future.
I work as a CAD developper for a large engineering firm since May'08. I was really excited when i first saw those dialog boxes they were creating here with ObjectDCL, a definite wow.  I been told the whole story about ObjectDCL being bought shortly after going opensource. A serious brainstorm took place here back then, to decide whether they would buy licenses to ObjectDCL (and pay) or going  :| with the opensource project. I can understand they were stressed out, considering the impressive number of CAD applications developped with ODCL in here. I can't imagine the crisis if 200+ applications used by 500+ users everyday were starting to go wrong  :-o...They first decided to buy 1 license to test. Finally they ended up buying license kits for all the developpers. Obviously they're all thrilled with the product (so am i although still a rookie with LISP and ODCL compared to them) and they consider to have taken the right decision. Cannot tell much about the support since i haven't need any so far (well i got talented users teaching me ) but those who did told me they were pleased with it.
Unfortunately i can't provide a comparison with OpenDCL because i never had the chance to use it (sorry for that)
Psuchewinner sure is going to have a blast....have fun!

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Display file path in a popup_list
« Reply #32 on: October 03, 2008, 03:25:55 PM »
Here's a little plug for OpenDCL.  Gives you some idea of what it's capable of.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Display file path in a popup_list
« Reply #33 on: October 06, 2008, 07:38:13 AM »
Welcome to TheSwamp Sebb77.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.