Prompt for Block Insertion Example (JS)

# Prompt for Block Insertion Example (JavaScript)

This example shows how to prompt a user for the insertion point and scale factors when inserting a Block instance. To insert a Block instance: Start DraftSight and open a drawing. To use the default values shown in the form: Click Insert Block. Click in the graphics area where you want to insert the Block Instance. Press the Enter key at each prompt in the command window, which indicates to use the default value. To change the default values shown in the form, type a value for the default: X scale factor in Default X Scale. Y scale factor in Default Y Scale. Z scale factor in Default Z Scale. Click Insert Block. Click in the graphics area where you want to insert the Block instance. Press the Enter key at each prompt in the command window, which indicates to use the default value. To specify your own values: Click Insert Block on the form. Click in the graphics area to set the Block instance's insertion point. Move the pointer and click in the graphics area again to set the Block instance's scale factors. - or - Type a value for the X, Y, and Z scale factors when prompted at the command window. Examine the drawing. NOTES: Errors and the Block instance's scale factors are printed to Output. To recreate this example: Right-click the topic and select to view the source. Save the file as an HTML file. Open the HTML file in your web browser. If using Windows Internet Explorer and running scripts is blocked, allow blocked content.
Default X Scale:
Default Y Scale:
Default Z Scale:

### Output