1 / 68

Script Files and Slide Shows

Script Files and Slide Shows. Sacramento City College Engineering Design Technology. Slides and Slide Shows. Slides and Slide Shows. A slide in AutoCAD Is similar to a slide in photography. Is a snapshot of graphics screen display. Cannot be edited or plotted .

mvanover
Download Presentation

Script Files and Slide Shows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Script Files and Slide Shows Sacramento City College Engineering Design Technology Script Files and Slide Shows

  2. Slides and Slide Shows Script Files and Slide Shows

  3. Slides and Slide Shows • A slide in AutoCAD • Is similar to a slide in photography. • Is a snapshot of graphics screen display. • Cannot be edited or plotted. • Can be viewedone at a time on the screen. • A continuous slide show can be created. Script Files and Slide Shows

  4. Slides and Slide Shows • Slides are excellent for • Demonstrations. • Presentations. • Displays. Script Files and Slide Shows

  5. Slides and Slide Shows • A slide show • is a group of slides that are displayed at preset time intervals. • The display of the slides is controlled by a script file. • A script file is a logical sequence of validAutoCAD commands stored in a .txt file. Script Files and Slide Shows

  6. Slides and Slide Shows • To make slides • Display the drawing for which you need a slide. • Select the MSLIDE command • Pick the drive and folder in which the file is to be stored. • Enter the file name in the File name: text box for the slide • Pick the Save button. • AutoCAD automatically attaches an .sld file extension. Script Files and Slide Shows

  7. Slides and Slide Shows • Choose location where slides will be stored. • AutoCAD by default stores slides in the AutoCAD directory. • This is not a good location for slides. • Keep the AutoCAD directory free of drawing, slides, and AutoLISP files. Script Files and Slide Shows

  8. Slides and Slide Shows • Good locations for slides • Local hard disk drive • USB media • Create a separate folder in the location where you choose to store slides. Script Files and Slide Shows

  9. Script Files and Slide Shows

  10. Naming Slides Script Files and Slide Shows

  11. Slides and Slide Shows • Slide names should follow a pattern. • Name the slide to reflect the • Client name or • Project number • Examples: • weyersld01, weyersld02, etc. • 4305sld01, 4305sld02, etc. Script Files and Slide Shows

  12. Slides and Slide Shows • To view a slide, type VSLIDE • Command: VSLIDE • The Select Slide Filedialog box appears. • Pick the slide you want to display • Pick OK. • The slide is displayed in the graphics window. Script Files and Slide Shows

  13. Creating Script Files to Automate AutoCAD Script Files and Slide Shows

  14. Slides and Slide Shows • A Script File • is a list of valid AutoCAD commands stored in a text file. • Is created using a wordprocessor. • Notepad • MS DOS EDIT • Has a .scr file extension Script Files and Slide Shows

  15. Slides and Slide Shows • Running the Script file • When the script file is read by AutoCAD, the entire list of commands is performed without additional input from the user. Script Files and Slide Shows

  16. Slides and Slide Shows • A Script File contains valid AutoCAD commands in a specific sequence. • VSLIDE (AutoCAD command - displays slide) • DELAY (A slide display time) • VSLIDE • DELAY • RSCRIPT (AutoCAD command to cause the show to repeat.) • Three blank lines at the end of the file. Script Files and Slide Shows

  17. Creating Script Files • Scripts enable nonprogrammers to automate AutoCAD functions. • Scripts can be used for specific functions, such as • Plotting a drawing with the correct PLOT command values and settings • Creating a slide show. Script Files and Slide Shows

  18. Writing Script File - Basic Rules Script Files and Slide Shows

  19. Creating Script Files • When writing a script file, • 1. Use one command or option per line. • Makes the file easier to fix if the script does not work properly. • 2. Press [Enter] after typing a command. • 3. A blank line = [Enter] • If the next option of a command is a default value to be accepted, press [Enter] again. • This leaves a blank line in the script file, which represents pressing [Enter]. Script Files and Slide Shows

  20. Creating Script Files • When writing a script file, • 4. A space = [Enter] • 5. A blank line = [Enter] • 5. Three blank lines are required at the end of the script file. Script Files and Slide Shows

  21. Writing a Slide Show Script File Script Files and Slide Shows

  22. Writing a Slide Show Script File • A slide show script file • Contains only three AutoCAD commands. • VSLIDE. • DELAY. • VSLIDE. • DELAY. • VSLIDE. • DELAY. • RSCRIPT. Script Files and Slide Shows

  23. Writing a Slide Show Script File • A slide show script file • Can be a single pass or continuous show. • If RSCRIPT and three blank lines are included • The slide show will repeat • If not included • The slide show will run one time only. Script Files and Slide Shows

  24. Writing a Slide Show Script File • VSLIDE displays a slide. • The name of the slide follows the command. • VSLIDE kenslide01 Script Files and Slide Shows

  25. Writing a Slide Show Script File • An asterisk (*), in front of the slide file name causes the next slide to be preloaded. • VSLIDE kenslide01 • VSLIDE *kenslide02 • DELAY • VSLIDE • A VSLIDE command that is notfollowed by a slidename displays the pre-loaded slide. Script Files and Slide Shows

  26. The DELAY Command • DELAY • Specifies the display time in milliseconds • Maximum delay = 33 seconds (33,000) • Examples: • DELAY 33000 (33 second delay) • DELAY 4000 (4 second delay) Script Files and Slide Shows

  27. The RSCRIPT Command • RSCRIPT is used at the end of a script file. • RSCRIPT causes the script file to repeat. • Exactlythree blank lines • MUST be entered at the end of the script file. • The script will NOT run correctly without them. Script Files and Slide Shows

  28. The RESUME Command • RESUME • Restarts the slide show where it left off • (Sometimes) • Does not always work correctly. • Any script file can (theoretically) be interrupted and restarted using RESUME. Script Files and Slide Shows

  29. Writing A Script File - Example Script Files and Slide Shows

  30. Writing a Slide Show Script File • The following script uses four slides. • Each slide appears for three seconds. • The script repeats. • The next slide is preloaded while the previous one is viewed. Script Files and Slide Shows

  31. Script Files and Slide Shows

  32. Writing a Slide Show Script File • When storing slide files, include in the script file, the • disk drive letter and • path in front of the file name. • Example: F:cadlsld2 • Use this method with each VSLIDE command. Script Files and Slide Shows

  33. Viewing the Slide Show Script Files and Slide Shows

  34. Viewing the Slide Show • Start the slide show by • Entering SCR or SCRIPT at the Command: prompt • OR • Picking Run Script... from the Tools pull-down menu. • OR • Select the script file name show.scr from the Select Script File dialog box. Script Files and Slide Shows

  35. Script Files and Slide Shows

  36. Script Files and Slide Shows

  37. Viewing the Slide Show • The commands in the script file are displayed at the Command: prompt window as the slides appear. • To stop the show, • Press the [Backspace] key or • [ESC] key. Script Files and Slide Shows

  38. Troubleshooting the Slide Show Script Files and Slide Shows

  39. Troubleshooting the Slide Show • To correct, problems in your script file. • 1. Run the script to see where it crashes (quits working). • 2. Check the command line for the last command that was executed. Script Files and Slide Shows

  40. Troubleshooting the Slide Show • 3. Look for error messages, such as: • Can't open slide file xxxxx (Incorrect slide file name). • xxxxx Unknown command (Command spelled incorrectly or a space left at the end of the line). • Requires an integer value (Delay value not all numerical characters. Possibly a space at the end of the line). Script Files and Slide Shows

  41. Troubleshooting the Slide Show • 4. Correct the problem in the script file and save the file. • 5. Test the script. • The most common errors are • Misspelled commands. • Spaces at the end of lines. Script Files and Slide Shows

  42. Troubleshooting the Slide Show • The process of “debugging” the script file is performed by • AutoCAD open in one window • Script file open in a NOTEPAD window. Script Files and Slide Shows

  43. Troubleshooting the Slide Show • Alt-TAB between the windows • Run Script file • Find location where it stops • Switch to NOTEPAD window with Alt-TAB • Correct mistake • SAVE the script file! • Go back to AutoCAD using Alt-TAB • Run script file again. • Repeat steps over and over until script works. Script Files and Slide Shows

  44. Troubleshooting the Slide Show • Watch for extra spaces! • If you suspect there is a space at the end of a line, it is best to delete the line and retype it. • If you use Notepad or EDIT, • It is easy to see if a space exists. • The flashing cursor, when placed at the end of a line, does not rest on the last character. Script Files and Slide Shows

  45. Using Text Editors Script Files and Slide Shows

  46. Using Text Editors • Word processing or text editor programs can be used to write scripts. • The program must be capable of saving the file in “ASCII” format. Script Files and Slide Shows

  47. Using Text Editors • ASCII is an acronym for • American Standard Code for Information Interchange. • Computer ASCII text files can be created with: • The MS-DOS EDIT text editor • Windows Notepad • Windows WordPad. Script Files and Slide Shows

  48. Using Text Editors • Word processing files must be saved in ASCII format to be readable by AutoCAD. Script Files and Slide Shows

  49. Using Text Editors • Typical commercial wordprocessing programs: • Windows WordPad. • Microsoft Word. • Corel WordPerfect. • Ami Pro. • Do NOT save in ASCII format by default! • You must choose option to save as .txt file Script Files and Slide Shows

  50. Using Wordprocessors • If you choose to use a word processor, save the document as a text file. • This prevents the inclusion of special formatting codes. Script Files and Slide Shows

More Related