Author Topic: SCRIPT FILE HELP  (Read 11090 times)

0 Members and 1 Guest are viewing this topic.

AVCAD

  • Guest
SCRIPT FILE HELP
« on: July 15, 2004, 04:58:29 PM »
I am writting a script file to do an etransmit in conjuction with the script pro program.

I get it to work except the path to where the File needs to be saved.

Does anyone know what is going on here.

Oh, I get the 1st file saved but then it wants to over write the same file. And the name of the file ends up just being ".exe" thats it!

Why doesnt it work like a plot file script. Then it would just use the master file name and save it as that (ex. T00.EXE) in that same directory. That would rock!!

Any help here would be great. Thanks!

Code: [Select]

;Invokes the Etransmit Command
-ETRANSMIT
;Creates an executable (.exe) file
E
;File Save Location
THIS IS WHERE IT GETS ALL SCREWED UP!!!!
;File Notes
.
;Include font files
YES
;Convert Drawings
NO
;Preserve DIrectory Structure
YES
;Remove Xref Paths
NO
;Make Web page files
NO
;ENDS COMMAND (2) BLANK SPACES BELOW THIS LINE



Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
SCRIPT FILE HELP
« Reply #1 on: July 15, 2004, 10:34:44 PM »
Try
(getvar "dwgname")
as the file name
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

AVCAD

  • Guest
SCRIPT FILE HELP
« Reply #2 on: July 16, 2004, 10:30:03 AM »
I was playing with that...but isnt that a Lisp command...can you use that in a script file?

If so how?

I tried this...

Code: [Select]

;Invokes the Etransmit Command
-ETRANSMIT
;Creates an executable (.exe) file
E
;File Save Location
C:\Documents and Settings\smwuser\My Documents\ETRANSMIT\(getvar "dwgname")
;File Notes

;Include font files
YES
;Convert Drawings
NO
;Preserve DIrectory Structure
YES
;Remove Xref Paths
NO
;Make Web page files
NO
;ENDS COMMAND (2) BLANK SPACES BELOW THIS LINE




thanks!

AVCAD

  • Guest
SCRIPT FILE HELP
« Reply #3 on: July 16, 2004, 06:00:23 PM »
HELP....please

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
SCRIPT FILE HELP
« Reply #4 on: July 16, 2004, 07:10:30 PM »
Quote from: AVCAD
I was playing with that...but isnt that a Lisp command...can you use that in a script file?

If so how?

I tried this...

Code: [Select]

;Invokes the Etransmit Command
-ETRANSMIT
;Creates an executable (.exe) file
E
;File Save Location
C:\Documents and Settings\smwuser\My Documents\ETRANSMIT\(getvar "dwgname")
;File Notes

;Include font files
YES
;Convert Drawings
NO
;Preserve DIrectory Structure
YES
;Remove Xref Paths
NO
;Make Web page files
NO
;ENDS COMMAND (2) BLANK SPACES BELOW THIS LINE




thanks!


Yes you can use lisp in a script file provided you are not running it on LT ...

To fix the above code use this:
Code: [Select]
-ETRANSMIT
E
(strcat "C:/Documents and Settings/smwuser/My Documents/ETRANSMIT/"(getvar "dwgname"))

YES
NO
YES
NO
NO




You may need to adjust for spaces
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

AVCAD

  • Guest
SCRIPT FILE HELP
« Reply #5 on: July 19, 2004, 02:50:55 PM »
I tried you suggestion above and used the code you posted but this is the error I got....


Code: [Select]

Command: (acet-script-run
"E:/CAD/CHI-CUSTOMCAD/SCRIPTS/ETRANSMIT/ETRANSMIT.SCR" T)

Pre-processing script...Initializing VBA System...Done

Command: -ETRANSMIT
Transmittal type [Folder/self-extracting Executable/Zip/Report only] <Report
only>: E
Transmittal name and location: (strcat "C:/Documents and Settings/smwuser/My
Documents/ETRANSMIT/"(getvar "dwgname"))
Invalid path
Transmittal name and location:
Invalid path
Transmittal name and location: YES
Transmittal note: NO
YES
NO
NO

Include fonts? [Yes/No] <Yes>: scr-quit

Invalid option keyword.
Include fonts? [Yes/No] <Yes>: *Cancel*


I adjusted the code for the correct spaces and such...but I get the error at the same point I always get it.

Code: [Select]

Transmittal name and location: (strcat "C:/Documents and Settings/smwuser/My
Documents/ETRANSMIT/"(getvar "dwgname"))
Invalid path
Transmittal name and location:
Invalid path


I am not using LT I am on 2004. Here is the code as I used it.

Code: [Select]

-ETRANSMIT
E
(strcat "C:/Documents and Settings/smwuser/My Documents/ETRANSMIT/"(getvar "dwgname"))

YES
NO
YES
NO
NO




For some reason It is not allowing the Lisp code to work in the SCR file.

Anymore suggestions would be great. For now I have it working on a button but I have to open each drawing manually and hit enter when the file name section comes up.

I want to use a SCRIPT file because I would like to use Scriptpro with it so that I can run it on multiple drawings at a time.

Thanks again!

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
SCRIPT FILE HELP
« Reply #6 on: July 19, 2004, 03:26:38 PM »
If ETransmit is a lisp program it won't work ... I 'll have to see if there is another solution
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Andrew H

  • Guest
SCRIPT FILE HELP
« Reply #7 on: July 19, 2004, 03:55:19 PM »
Do you have to have them as a self-extracting executable? If so you can't do it by script or I don't know how to tell AutoCAD through a script file what name to use (there is a step in this particular option that prompts for user provided information). But if you can create zip file instead I can get you a script file in seconds.

AVCAD

  • Guest
SCRIPT FILE HELP
« Reply #8 on: July 19, 2004, 03:58:32 PM »
ZIP file would be fine too. But both options ask for user input.

Let me see the file though if it works it works I dont care. you can email me it at

ppdecanio@hotmail.com

if you dont want to post it here.

Thanks!

Andrew H

  • Guest
SCRIPT FILE HELP
« Reply #9 on: July 19, 2004, 04:01:49 PM »
Let me do some test runs to work out the bugs, then I'll just post it here.

But please note: THIS IS FOR AUTOCAD 2004 ONLY!!! THIS WILL NOT WORK WITH AUTOCAD 2005.

Andrew H

  • Guest
SCRIPT FILE HELP
« Reply #10 on: July 19, 2004, 04:57:34 PM »
I'm still running tests and will post it as soon as I have it debugged.

But it may be a while because my boss just stopped by to get me to help with something office related.

If nothing else I'll try to remember to post what I have by the end of the day and with a description as to what stage the debugging process is in, so someone else can continue where I left off.

Andrea

  • Water Moccasin
  • Posts: 2372
SCRIPT FILE HELP
« Reply #11 on: July 19, 2004, 11:41:11 PM »
why not using...

(strcat (getvar "dwgprefix")(getvar "dwgname")))


?
Keep smile...

AVCAD

  • Guest
SCRIPT FILE HELP
« Reply #12 on: July 20, 2004, 10:10:19 AM »
Quote from: Andrea
why not using...

(strcat (getvar "dwgprefix")(getvar "dwgname")))


?


The Script file wont allow that code, it wont read it or soemthing. If you look above at some of the post's I have tried a similar code but got back errors.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
SCRIPT FILE HELP
« Reply #13 on: July 20, 2004, 10:18:45 AM »
Since etransmit is an arx application I don't think you can use any autolisp while the program is running. I hope someone can prove me wrong though. :D
TheSwamp.org  (serving the CAD community since 2003)

Andrew H

  • Guest
SCRIPT FILE HELP
« Reply #14 on: July 20, 2004, 10:55:24 AM »
That was the problems I was having yesterday, so thanks for the information.

One thought for AVCAD...
I have all the rest of the script worked out except for the portion where it asks the user for the save location and name (the part we're having the trouble with).

What if, at that point in the script paused the script let the user pick the location and name of the file then let the script continue. This would automate all the etransmit options and open and close all the drawings, just someone would still have to enterface with the script to tell it were you want the file(s) saved. It might make it a little faster than opening each file and running an etransmit then running through all the etransmit options then closing the drawing and opening the next, etc..

Let me know if you think this would work and I'll post the script I have so far (which I think you said you had a script already created for all the options, just couldn't get around the save location and name thing).