Jump to content

multiple file selection dialog box using lisp & powershell


Recommended Posts

Posted

Attached is an  improved version of getfiled that implements powershell with the option to select single or multiple files returning a list of the selected item(s):

Examples:

(pl:getfiledps "Select Files" (getvar"dwgprefix") "dwg" 0) ; for single selection of file type dwg
(pl:getfiledps "Select Files" (strcat (getenv "userprofile") "\\downloads") "dwg;dxf" 1) ; for multiple selection of file types dwg & dxf

Feedback & comments are welcome.

image.thumb.png.99afddbce9f2bbe7040f12a82ceae770.png

pl_getfiledps.lsp

  • Like 3
Posted

Many work computers are likely limited for using Powershell.

 

Unrelated to Powershell being blocked, I get an error loading.

 

 error: string too long on input

 

Posted

String too long - just a guess, file path and file name string length? - going back old school when we had 256? characters for it all - but just a guess

 

Posted

I'm not going to troubleshoot it since Powershell is blocked at work, but if the load has that error, then it's something in the Code, probable in the DCL write-line part.

  • Like 1
Posted

Thanks for troubleshooting. That could definitely be caused by having a write-line statement that's way too long.

I've made the changes to reduce the write-line on the dcl. Kindly troubleshoot some more for offices that do allow for running powershell with the attached revised version...thanks in advance.

pl_getfiledps.lsp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...