Jump to content

Recommended Posts

Posted

Is the procedure the same for all 50 drawings?

 

If so, look at the program I linked you to:

 

http://www.cadtutor.net/forum/showpo...7&postcount=23

 

Just enter the script operations at the prompt, using *file* where the drawing filename should be.

 

The program will create a script that can be run to operate on all the drawings in the selected directory (and sub-directories).

 

Lee

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

  • ChrisCMU

    16

  • Lee Mac

    14

  • dbroada

    4

Top Posters In This Topic

Posted

I don't know all the functions of your program, but would I have to enter a file name each time? I certainly don't want to do that (it would be faster to simply run a lisp/script manually in each drawing).

 

In the batch file I simply start with a listing of all the scripts in a folder (generate using "dir/b > list.txt"). Then I fill down with the paths. This only takes about 5 minutes to generate the batch.

 

If using your program takes more time I don't think it's a viable alternative. I really don't know because I don't know what all the program is doing.

Posted
I don't know all the functions of your program, but would I have to enter a file name each time? I certainly don't want to do that (it would be faster to simply run a lisp/script manually in each drawing).

 

In the batch file I simply start with a listing of all the scripts in a folder (generate using "dir/b > list.txt"). Then I fill down with the paths. This only takes about 5 minutes to generate the batch.

 

If using your program takes more time I don't think it's a viable alternative. I really don't know because I don't know what all the program is doing.

 

No.

 

In my program you only enter the one line of operations and use *file* where the drawing filename should be.

 

You then select a directory of drawings to process, and my program creates a script to process those drawings which you can then run.

 

Try it, and you'll see. :)

Posted

I just tested it. Again, it does the same processes on all drawings. That doesn't help me when every single drawing has a unique script to run. It would have to replace *script* with the name of the script (just like it does with the file name). I suppose I could do some text editing and paste in the name of the individual scripts after your main script is created.

 

I'll test this some more, it may work yet.

Posted

In that case, I would load a LISP in the script:

 

(load "mylisp.lsp")

Posted

How would I load the lisp though? there is no appload that avoids the GUI. I'd need to something like this in your program:

 

open drawing1.dwg X Y qsave close

 

X would be replaced with the loading function and Y replaced with the lisp name. The latter is the easy part (I can copy and paste the drawing name since they match). I don't know how to load the individual lisp though (in this case drawing1, drawing2, etc).

 

Do you know how to do that? Can I just use load, like I would in startup?

 

EDIT - I think that will work:

open drawing1.dwg (load "LispName") (LispName) qsave close

Posted
EDIT - I think that will work:

open drawing1.dwg (load "LispName") (LispName) qsave close

 

(LispName) if it is a sub-function, (c:LispName) if it is command-invoked.

Posted

Thanks. This does run way faster without opening and closing CAD.

Posted
Thanks. This does run way faster without opening and closing CAD.

 

Happy to help mate, glad we finally got there :)

Posted

One last thing...

 

I'm having trouble getting the script to open another script. To run the lisp you just put it in brackets. How do I get the script to run?

 

This is what I tried (there are no returns, just a space between arguments):

 

open "S:\Departments\GIS_Production\Projects\5357_MT_MTP_ARRA\Working\Montana\ARRA7\mt200130n0500e0\mt200130n0500e0.dwg" _script "S:\Departments\GIS_Production\Projects\5357_MT_MTP_ARRA\images\ARRA7\scripts\mt200130n0500e0.scr"

 

This is what I get in the command line:

Command: _script

Enter script file name

t200130n0500e0\mt200130n0500e0.scr>:

"S:\Departments\GIS_Production\Projects\5357_MT_MTP_ARRA\images\ARRA7\scripts\mt

200130n0500e0.scr"

Posted

It seems like reading other threads that the first script will never resume. I'll have to get my programmer to generate the files into Lisps instead of the scripts...I just hoped there was a way to run the scripts until that happens.

Posted

Yeah, I think what we'll end up doing is combining all the scripts into one giant one that will run inside CAD. Hopefully down the road he can simply change them to lisps.

Posted
I don't think you can nest scripts - the new one takes over.

that is correct. You can make them serial to call the next script but you can't nest them.

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