Author Topic: BatchWORX  (Read 7486 times)

0 Members and 1 Guest are viewing this topic.

roy_043

  • Water Moccasin
  • Posts: 1720
  • BricsCAD 18
Re: BatchWORX
« Reply #30 on: June 05, 2012, 01:47:57 PM »
During further testing (see comment 19 below) I have found that an old issue is not entirely resolved:

1.
You should consider this scenario: The user selects some drawings for processing and then decides to switch to a different folder. But instead of selecting a new folder the user changes his mind and cancels the folder dialog. Your main dialog now reports: "NO DIRECTORY SET", but the left list_box is not cleared. In fact you can still select items from the list resulting in "nilDrawingName.dwg" entries in the right list_box.
T:
I found this issue and I think that I have fixed it to retain the current directory is the user cancels.
R:
If the user cancels the folder dialog the BatchDirectory variable is set to "nil" (string). If the user subsequently uses the arrow keys the results are not as expected.

19.
I could not reproduce what you describe in your last post, but your solution points to a new issue. Apparently the variable BatchDirectory can sometimes contain a string that does not end in a path separator. I think it is essential for your program that this variable is either nil or contains a path string that does end in a path separator.

roy_043

  • Water Moccasin
  • Posts: 1720
  • BricsCAD 18
Re: BatchWORX
« Reply #31 on: June 06, 2012, 03:59:25 AM »
This post in the ODCL forum may be of interest:
http://www.opendcl.com/forum/index.php?topic=1809.0
Here (vla-sendcommand) is used to handle the batch process.

rayakmal

  • Newt
  • Posts: 24
Re: BatchWORX
« Reply #32 on: June 21, 2019, 06:10:03 AM »
The program is very useful for me. My question is how should I modify the code so every time I choose the batch folder, it will directly shows D:\Project\2019\ ?
I tried to change the DCL but it won't work as intended.
Code - Auto/Visual Lisp: [Select]
  1.         (if (= nil BatchDirectory)
  2.                 (set_tile "files_dir" "D:\Project\2019\")
  3.                 (set_tile "files_dir" BatchDirectory)
  4.         )
  5.  

Any help is greatly appreciated.

Lee Mac

  • Seagull
  • Posts: 12263
  • London, England
Re: BatchWORX
« Reply #33 on: June 21, 2019, 08:02:36 AM »
The backslash is an escape character in AutoLISP, therefore to yield a literal backslash in a string you'll need to prefix the backslash with another backslash to mark it as a literal, i.e.:

Code - Auto/Visual Lisp: [Select]
  1. "D:\\Project\\2019\\"

rayakmal

  • Newt
  • Posts: 24
Re: BatchWORX
« Reply #34 on: June 21, 2019, 10:52:26 AM »
The backslash is an escape character in AutoLISP, therefore to yield a literal backslash in a string you'll need to prefix the backslash with another backslash to mark it as a literal, i.e.:

Code - Auto/Visual Lisp: [Select]
  1. "D:\\Project\\2019\\"

I did, but the browse folder still by default shows the user's folder.