Jump to content

Select multiple drawings - help


muthu123

Recommended Posts

Dear friends,

 

We need a dialog/form to select multiple drawings from multiple folder with the buttons add drawings,delete drawings. It should return all the drawing list with its path to process some task.

 

Yours,

Muthu.

Link to comment
Share on other sites

For drawing management, which I assume is where you are heading with this even if the question is pretty vague - I would explore Autodesk Vault. I haven't used it myself, but from what I have heard it is good.

Link to comment
Share on other sites

For drawing management, which I assume is where you are heading with this even if the question is pretty vague - I would explore Autodesk Vault. I haven't used it myself, but from what I have heard it is good.

 

Thank you lee.

Link to comment
Share on other sites

The Batch engine in my signature utilizes one. I've stripped it out for your convenience.

 

Just update the "root" and "rotLst" variables in the function to accommodate your needs, as well as the "diaID1" variable to locate the accompanied .dcl file.

 

You can call the function as so:

 

(dwgdia nil)

 

I hope it works for you.

dwgdia.LSP

DIALOG_FOLDERS.dcl

Link to comment
Share on other sites

The Batch engine in my signature utilizes one. I've stripped it out for your convenience.

 

Just update the "root" and "rotLst" variables in the function to accommodate your needs, as well as the "diaID1" variable to locate the accompanied .dcl file.

 

You can call the function as so:

 

(dwgdia nil)

 

I hope it works for you.

 

There is no function defined in your lisp.

"FB-STRING-DELIM"

Link to comment
Share on other sites

There is no function defined in your lisp.

"FB-STRING-DELIM"

 

Gah! Rookie mistake, my bad.

 

Add this to the .lsp file and reload it. Sorry!

 

(defun fb-string-delim(str del / runLst runStr newLst);
 (setq runLst (vl-string->list str)
   runStr ""
   newLst nil)
 (foreach forVar runLst
   (if (/= (ascii del) forVar)
     (setq runStr (strcat runStr (chr forVar)))
     (setq newLst (append newLst (list runStr)) runStr ""))
   )
 (setq newLst (append newLst (list runStr)))
 ); Parses a string into a list of strings given a certain delimiter

 

Funny thing was, when I was extracting the function from my batch engine, I had problems with this part.

 

You don't need it, it was just a convenient way for me to create a list of all the drives we use at work without typing them all individually. I wanted to be weird. Just as long as "rotLst" contains a list of directories, you're good.

Link to comment
Share on other sites

Gah! Rookie mistake, my bad.

 

Add this to the .lsp file and reload it. Sorry!

 

(defun fb-string-delim(str del / runLst runStr newLst);
 (setq runLst (vl-string->list str)
   runStr ""
   newLst nil)
 (foreach forVar runLst
   (if (/= (ascii del) forVar)
     (setq runStr (strcat runStr (chr forVar)))
     (setq newLst (append newLst (list runStr)) runStr ""))
   )
 (setq newLst (append newLst (list runStr)))
 ); Parses a string into a list of strings given a certain delimiter

 

Funny thing was, when I was extracting the function from my batch engine, I had problems with this part.

 

You don't need it, it was just a convenient way for me to create a list of all the drives we use at work without typing them all individually. I wanted to be weird. Just as long as "rotLst" contains a list of directories, you're good.

 

Please send the following function also.

error: no function definition: FB-DIRFIX

Link to comment
Share on other sites

*headdesk*

 

See, I haven't looked into the code for this in months, so I forget what's supposed to be there..

 

Add these three, and -hopefully- that should do it...

 

(defun fb-dirFix(listy / )
 (vl-remove-if '(lambda (x) (or (= x ".") (= x ".."))) listy)
 ); Get rid of the root and parent options in a passed directory

(defun fb-dirLstFix(dir / subSpa)
 (setq subSpa "")
 (repeat (length (vl-remove-if-not '(lambda (x) (= x 47)) (vl-string->list dir))) (setq subSpa (strcat subSpa "  ")))
 (strcat subSpa (vl-filename-base dir) (if (vl-filename-extension dir) (vl-filename-extension dir) ""))
 ); Modify a directory to visually represent its hierarchy position

(defun fb-filLstFix(dir / newDir dirLst)
 (setq newDir "" dirLst (fb-string-delim dir "/"))
 (foreach forVar (reverse (cdr (reverse dirLst)))
   (if (> (strlen forVar) 5)
     (setq newDir (strcat newDir (substr forVar 1 5) " ... /"))
     (setq newDir (strcat newDir forVar "/"))
     )
   )
 (setq newDir (strcat newDir (last dirLst)))
 ); Modify a directory to condense its length

Link to comment
Share on other sites

*headdesk*

 

See, I haven't looked into the code for this in months, so I forget what's supposed to be there..

 

Add these three, and -hopefully- that should do it...

 

(defun fb-dirFix(listy / )
 (vl-remove-if '(lambda (x) (or (= x ".") (= x ".."))) listy)
 ); Get rid of the root and parent options in a passed directory

(defun fb-dirLstFix(dir / subSpa)
 (setq subSpa "")
 (repeat (length (vl-remove-if-not '(lambda (x) (= x 47)) (vl-string->list dir))) (setq subSpa (strcat subSpa "  ")))
 (strcat subSpa (vl-filename-base dir) (if (vl-filename-extension dir) (vl-filename-extension dir) ""))
 ); Modify a directory to visually represent its hierarchy position

(defun fb-filLstFix(dir / newDir dirLst)
 (setq newDir "" dirLst (fb-string-delim dir "/"))
 (foreach forVar (reverse (cdr (reverse dirLst)))
   (if (> (strlen forVar) 5)
     (setq newDir (strcat newDir (substr forVar 1 5) " ... /"))
     (setq newDir (strcat newDir forVar "/"))
     )
   )
 (setq newDir (strcat newDir (last dirLst)))
 ); Modify a directory to condense its length

 

Thank you so much.

Now it is working fine.

Link to comment
Share on other sites

Happy to help! Especially since the first time I posted it, I got nothing but complaints about the layout.

Link to comment
Share on other sites

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...