Presentation is loading. Please wait.

Presentation is loading. Please wait.

Script Files and Slide Shows1 Sacramento City College Engineering Design Technology.

Similar presentations


Presentation on theme: "Script Files and Slide Shows1 Sacramento City College Engineering Design Technology."— Presentation transcript:

1 Script Files and Slide Shows1 Sacramento City College Engineering Design Technology

2 Script Files and Slide Shows2 Slides and Slide Shows

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

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

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

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

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

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

9 Script Files and Slide Shows9

10 10 Naming Slides

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

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

13 Script Files and Slide Shows13 Creating Script Files to Automate AutoCAD

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

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

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

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

18 Script Files and Slide Shows18 Writing Script File - Basic Rules

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

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

21 Script Files and Slide Shows21 Writing a Slide Show Script File

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

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

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

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

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

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

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

29 Script Files and Slide Shows29 Writing A Script File - Example

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

31 Script Files and Slide Shows31

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

33 Script Files and Slide Shows33 Viewing the Slide Show

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

35 Script Files and Slide Shows35

36 Script Files and Slide Shows36

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

38 Script Files and Slide Shows38 Troubleshooting the Slide Show

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

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

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

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

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

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

45 Script Files and Slide Shows45 Using Text Editors

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

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

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

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

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

51 Script Files and Slide Shows51

52 Script Files and Slide Shows52 ASCII u ASCII was established in 1950’s u Many computer manufacturers were designing computers. u No standard representation existed of u Alphabet (A-Z) u Numbers (0-9) u Special characters (<>,. [ ] { } ( ) +, - =) etc.

53 Script Files and Slide Shows53 ASCII Character Set

54 Script Files and Slide Shows54 ASCII u ASCII u Work on ASCII formally began October 6, 1960. u The first edition of the standard was published during 1963, u A major revision during 1967. u The most recent update during 1986

55 Script Files and Slide Shows55 ASCII u Established a standard set of characters that was recognized by ALL computer manufacturers and the US government. u Allowed interchange of information much more readily.

56 Script Files and Slide Shows56 ASCII u On March 11, 1968, U.S. President Lyndon B. Johnson mandated that all computers purchased by the United States federal government support ASCII, stating: u I have also approved recommendations of the Secretary of Commerce regarding standards for recording the Standard Code for Information Interchange on magnetic tapes and paper tapes when they are used in computer operations. u All computers and related equipment configurations brought into the Federal Government inventory on and after July 1, 1969, must have the capability to use the Standard Code for Information Interchange and the formats prescribed by the magnetic tape and paper tape standards when these media are used.

57 Script Files and Slide Shows57 ASCII u Other international standards bodies have ratified character encodings such as ISO/IEC 646 that are identical or nearly identical to ASCII, with extensions for characters outside the English alphabet and symbols used outside the United States, such as the symbol for the United Kingdom's pound sterling (£).

58 Script Files and Slide Shows58 ASCII u Almost every country needed an adapted version of ASCII since ASCII only suited the needs of the USA and a few other countries. u Canada u had its own version that supported French characters. u ISCII (India), u VISCII (Vietnam), u YUSCII (Yugoslavia). u Although these encodings are sometimes referred to as ASCII, true ASCII is defined strictly only by ANSI standard.

59 Script Files and Slide Shows59 Command Aliases The ACAD.PGP File

60 Script Files and Slide Shows60 Command Aliases u AutoCAD allows you to abbreviate commands. u Feature introduced with AutoCAD 11. u Abbreviating commands is called Command Aliasing.

61 Script Files and Slide Shows61 Command Aliases u AutoCAD comes with predefined aliases. u Aliases are listed in the acad.pgp file. u Over 160 commands are aliased. u Appendix F in the text gives a complete list.

62 Script Files and Slide Shows62 Command Aliases u You can easily create your own aliases by editing the acad.pgp file. u To enter an alias PP for PLOT, add the following line to the acad.pgp file. u PP*PLOT u The * means that this is an alias. u Save the acad.pgp file.

63 Script Files and Slide Shows63 Command Aliases u To cause the alias to be in effect: u Restart AutoCAD OR u Type REINIT and select the PGP file check box.

64 Script Files and Slide Shows64 Editing the ACAD.PGP File u To edit the ACAD.PGP file u Use a text editor: u DOS EDIT u Windows NOTEPAD u Any other text editor u The ACAD.PGP file is stored in u \AUTOCAD\SUPPORT\ACAD.PGP

65 Script Files and Slide Shows65 The ACAD.PGP File u Windows Notepad can be initiated directly from AutoCAD. u Enter the following to open acad.pgp in Notepad: u Command: NOTEPAD u File to edit:

66 Script Files and Slide Shows66 Assignments

67 Script Files and Slide Shows67 Command Aliases Assignment u Create 5 command aliases u Modify ACAD.PGP file. u Demonstrate to instructor that command aliases work. u Each command alias MUST work correctly on the FIRST ATTEMPT to receive full credit !

68 Script Files and Slide Shows68 Slide Show Assignment u Create a 12 slide, repeating slide show. u Use any of your drawings for the slides. u Save all slides on u USB Media ; local hard disk drive u Save.scr file on u USB media; local hard disk drive u Demonstrate to instructor that slide show works correctly AND repeats! u Slide show MUST run correctly on the FIRST ATTEMPT to receive full credit !


Download ppt "Script Files and Slide Shows1 Sacramento City College Engineering Design Technology."

Similar presentations


Ads by Google