TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MSTG007 on October 03, 2016, 10:54:25 AM

Title: Translate Original Scripts to ScriptWriter Format
Post by: MSTG007 on October 03, 2016, 10:54:25 AM
This might be a silly question. Does anyone know if there is a way to translate old script files to Lee's ScriptWriter Format, so that they can easily load and run?

Thanks for any help!
Title: Re: Translate Original Scripts to ScriptWriter Format
Post by: Lee Mac on October 03, 2016, 01:32:32 PM
Operations that are to be performed on a single drawing should appear on a single line, with ENTER appearing as a space in the line and any occurrence of the drawing filename represented by the token *file*.

For example, this:
Code: [Select]
open
"C:/mydrawing1.dwg"
line
non
0,0,0
non
1,0,0

qsave
close
open
"C:/mydrawing2.dwg"
line
non
0,0,0
non
1,0,0

qsave
close
open
"C:/mydrawing3.dwg"
line
non
0,0,0
non
1,0,0

qsave
close

Would become this:
Code: [Select]
open *file* line non 0,0,0 non 1,0,0 qsave close
Title: Re: Translate Original Scripts to ScriptWriter Format
Post by: MSTG007 on October 03, 2016, 01:38:21 PM
Thanks for the clarification Lee. I have some long script files. I didn't know if there was a something that could remove the return character for a space; but I need to do it manually, not a problem at all. Just thought I would ask.