Autocad lisp point specific folder

Autocad lisp point specific folder

morgan.bouchaud
Observer Observer
1,057 Views
3 Replies
Message 1 of 4

Autocad lisp point specific folder

morgan.bouchaud
Observer
Observer

Hi everybody, thanks for the acceptance on this forum.

Sorry for my english. I work in an Architecture Company based in France as a Graphic designer, I usually use Sketchup for modelling and Enscape for rendering.

 

I'm totally a newbie using autocad lisp and I'm trying to figure out how it works. Also trying to help a colleague.

 

Here's my problem/question:

I'm using an existing lisp allowing me to rename several blocks in different *.dwg files. In this way I can save time.

Unfortunately, a window box appears and asks me to choose my Folder. So I have to expand all the folders 'till the good one.

I suppose that the command in the lisp is this one:

(setq oFolder (vlax-invoke
oShell
'BrowseForFolder
(vla-get-hwnd acApp)
"Select folder to process:"
0
(+ 1 64 256)

 

But what I want is to go directly to the drawing directory so I can select the files quickly instead of expanding everything that's before.

Here are some screenshots

The code

morganbouchaud_0-1656595293874.png

The dialog box I get

morganbouchaud_1-1656595358908.png

Thanks

 

0 Likes
1,058 Views
3 Replies
Replies (3)
Message 2 of 4

Sea-Haven
Mentor
Mentor

Have a look at this "Getfiled"

Help: getfiled (AutoLISP) (autodesk.com)

May be a french version.

 

0 Likes
Message 3 of 4

paullimapa
Mentor
Mentor

If you have Express Tools then the following code will work:

(if(and(member "acetutil.arx"(arx))acet-ui-getfile)(acet-ui-pickdir "Select Item" (getvar"dwgprefix") "Select Folder to Process")(alert"AutoCAD Express Tools Not Found"))

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 4

ronjonp
Mentor
Mentor

Take a look HERE

0 Likes