Jump to content

Script Writer


Lee Mac

Recommended Posts

Hmmm... currently the program will save a temporary script file which it proceeds to read when the script is run.

 

But, I suppose I could make the 'Save' button prompt for a location, then write out the .SCR file to that location.

 

And similarly, I suppose I could have a browse button on the load dialog so that the user could select an existing .SCR file to load, and the program would read the first line of the script and replace the filename automatically with the *file* delimiter for use with the program.

 

Some nice ideas,

 

Lee

Link to comment
Share on other sites

  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    21

  • asos2000

    8

  • The Buzzard

    5

  • jgmechengr19

    4

Top Posters In This Topic

Posted Images

I have updated the first post to Version 1.2, the program will now save Scr files to a user specified location should the user decide to hit 'Save'.

 

Also, the user can load an existing Scr file using the 'Browse' button when using the 'Load' dialog. This will import the file so that it is in a format that can be used by the program.

 

Enjoy, and if you have any questions regarding the operation of the program, just ask.

 

Lee

Link to comment
Share on other sites

I decided to update my old 'script writer' code to make the program a lot more user friendly.

 

Being an LT user I get mixed messages about whether a script creator will work. (There is no definitive test to know if it will not work, or I just set it up wrong!)

 

I have been told that scriptpro WILL work on LT, though I could not get it to. Lee Mac, could you tell me if this will work on LT?

Link to comment
Share on other sites

Thanks LEE

 

feedback

- *file* added at the end of script line not at the curser place. adding *file* next to loaded script.

- cant read this type of format when Enter used instead of space (see attached)

- Isn't better to add 2 bottuns, one for adding _.open *file* and another one for *file* _.close

up to my kowladge (and tell me if i am wrong) we have to add these 2 parts at the begining and at the end of script.

Scr-01.JPG

Scr-02.JPG

Link to comment
Share on other sites

Hi Isaac,

 

No, I'm afraid this utilises VLISP/DCL which won't run on LT without an extender :(

 

Thanks Lee Mac and Asos.

 

Great work on the program though, it still looks excellent.

 

While I'm here, do you know if Scriptpro would be the same story with LT?

Link to comment
Share on other sites

feedback

- *file* added at the end of script line not at the curser place. adding *file* next to loaded script.

- cant read this type of format when Enter used instead of space (see attached)

- Isn't better to add 2 bottuns, one for adding _.open *file* and another one for *file* _.close

up to my kowladge (and tell me if i am wrong) we have to add these 2 parts at the begining and at the end of script.

 

Hi Asos,

 

Many thanks for the feedback, it is appreciated.

 

The problem with the *file* button is that once the user clicks the 'Filename' button, the dialog focus is switched to that button, and the cursor position cannot be determined (in Standard DCL that is), before the action statements for that button are evaluated.

 

When importing the scripts - I assume that the script format is similar to that created by the program - i.e. processing one file per line, with the line being delimited by spaces.

 

I'm not sure about the extra buttons - I don't want to clutter the dialog, but I can see what you are saying. I just thought that the filename button would save the user from typing *file* - which, with all the asterisks, may get annoying.

 

Lee

Link to comment
Share on other sites

:cry::cry:Dear friends,

still i am finding,how its working?...........I can't find the way of executing..pls some one help me...

1. Loaded script file, using load script

2.clicked file name,edit the text (myfirst drawing placed in that directory) need .dwg?

&token means?

3.clicked directory,selected path

4.clicked run script

its showing error msg..........

here attached my cad screen as well as drawings stored location can any one help me?......

 

Thankin you:):)

By

mani

1.jpg

CAD SCR.png

CAD ERROR1.jpg

Link to comment
Share on other sites

The drawing filenames are written to the script automatically, using the files found in the directory you have selected.

 

You only need to include the first line of the script, and where the filename would usually be write: *file*.

 

The token *file* represents the filename in the script - this is exchanged for each of the filenames in the directory you have chosen when you run the script. The program saves time as you don't have to write all the filenames into the script, but only select a directory to process.

 

Example:

 

_.open *file* _.-la _off e-p-text-s ...

Let me know if you don't understand :)

Link to comment
Share on other sites

eeemmmmm

Unbelievable idea

What about Edit saved script line by double click on it,

But

The script line editing will effect the saved *.scr file?

Or asking the user to resave?

Hasan

Link to comment
Share on other sites

eeemmmmm

Unbelievable idea

 

What about Edit saved script line by double click on it,

But

The script line editing will effect the saved *.scr file?

Or asking the user to resave?

 

Hasan

 

That's not really feasible since when loading the script file, the program reads the file and is not working directly from the file.

 

However, the user can load the script file, make their changes, then save and overwrite the old script file.

Link to comment
Share on other sites

:(:(Now i understand the basic.........

its Working fine with Open saveas close script...in all the dwg placed in directory. but along with this my script is not working.

my need is want to layer off the "E-P-TEXT-S" layer in all the drawings.

pls anyone suggest the code (script)

1.open

2.layer off

3.saveas

4.close

Thanks in advance.............

mani:roll::roll:

Link to comment
Share on other sites

Dear LEE,:D:D:D:D:D:D

Now its working fine.......I am so happy while seen the success of program, then i was tried some of my own scripts. All are working.

its a wonderful , amazing , superb , classic , excellent .............never end

I am working one of the big project for last 2 years, so we are managing more than 500 files........at the time of submission we need to do small work (like layer off) in 100 drawings at pressure situation, that time onwards i am searching lisp like Script writer.........If i would got 2 years back, surely its save a valuable time. so now i am feeling like somebody getting life time achivement award......

Really Good one

Will hope your non stop performance........

Thank you once again..

Regards

mani :):):)

Link to comment
Share on other sites

Excellent Mani, I'm happy that you could benefit from the program - it sounds like it will save you a lot of time over the years :)

Link to comment
Share on other sites

  • 1 month later...

Hey Lee,

I was recommended to come check this out by The Buzzard. I am a little unsure how to use. I tried doing a simple thing like changing 'insunits' to 0 and that didn't work. lol.

 

_.open *file* _insunits 0 _.save *file* _.close

 

This is what I am trying to do though.

The company I work for makes many small parts and we need to add to a column in 'ambom' for over 2000 drawings. I want to know if its possible go into 'ambom' go to the 'Partid' column and type 'Special', then apply/ok, save the file and close it as well. I know your program will open/save/close the file, but is it able to do something like this. Maybe there is an easy LISP script I could make that would work. Let me know what you think.

 

p.s. each drawing already has the 'Partid' column, so it does not need to be created, only edited.

 

Kenter

Edited by Kenter
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...