list member modification
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
list member modification

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
masterbike360
Guest





Posted: Tue Jan 11, 2005 3:57 am    Post subject: list member modification Reply with quote

Hi all...

I'm using DOSLib 6.1. The function (dos_dir) return a list of file included in a specific directory.

("Drawing1.dwg" "Drawing2.dwg" "Drawing3.dwg")

How cna I modify this list to remove the drawing extension???

("Drawing1" "Drawing2" "Drawing3")

Thanks, Simon

Back to top
T.Willey
Guest





Posted: Tue Jan 11, 2005 4:00 am    Post subject: Re: list member modification Reply with quote

When you have your list

(setq NewList (mapcar 'vl-filename-base <your list>))

Tim
Back to top
Tony Tanzillo
Guest





Posted: Tue Jan 11, 2005 4:01 am    Post subject: Re: list member modification Reply with quote

(mapcar 'vl-filename-base <list>)

where <list> is a list of filenames with extensions.

Returns a copy of the list of filenames, without the extensions.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com

"masterbike360" <nospam@address.withheld> wrote in message
news:16691936.1105397859319.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Hi all...

I'm using DOSLib 6.1. The function (dos_dir) return a list of file included in a specific directory.

("Drawing1.dwg" "Drawing2.dwg" "Drawing3.dwg")

How cna I modify this list to remove the drawing extension???

("Drawing1" "Drawing2" "Drawing3")

Thanks, Simon


Back to top
masterbike360
Guest





Posted: Tue Jan 11, 2005 4:03 am    Post subject: Re: list member modification Reply with quote

Thank you very much!!!

Have a nice day...
Simon
Back to top
T.Willey
Guest





Posted: Tue Jan 11, 2005 4:04 am    Post subject: Re: list member modification Reply with quote

Happy to help.

Thanks, and You too.
Tim
Back to top
Alan Henderson @ A'cad So
Guest





Posted: Tue Jan 11, 2005 4:17 am    Post subject: Re: list member modification Reply with quote

You might want to check out the function (vl-directory-files [directory
pattern directories]) instead of the (dos_dir) function.
Then use function vl-filename-base

"masterbike360" <nospam@address.withheld> wrote in message
news:16691936.1105397859319.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Hi all...

I'm using DOSLib 6.1. The function (dos_dir) return a list of file
included in a specific directory.

("Drawing1.dwg" "Drawing2.dwg" "Drawing3.dwg")

How cna I modify this list to remove the drawing extension???

("Drawing1" "Drawing2" "Drawing3")

Thanks, Simon
Back to top
masterbike360
Guest





Posted: Tue Jan 11, 2005 6:37 pm    Post subject: Re: list member modification Reply with quote

I'm using (dos_dir) presently... He accomplish what I want.
Is there a big difference with (vl-directory-files [directory
pattern directories])?

Thanks, Simon
Back to top
Alan Henderson @ A'cad So
Guest





Posted: Tue Jan 11, 2005 6:59 pm    Post subject: Re: list member modification Reply with quote

No difference that I know. I just wanted you to be aware of the lisp method.

"masterbike360" <nospam@address.withheld> wrote in message
news:32587984.1105450661944.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
I'm using (dos_dir) presently... He accomplish what I want.
Is there a big difference with (vl-directory-files [directory
pattern directories])?

Thanks, Simon
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB