Hide Table of Contents
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:

  1. Start DraftSight and open a drawing.
  2. To use the default values shown in the form:
    1. Click Insert Block.
    2. Click in the graphics area where you want to insert the Block Instance.
    3. Press the Enter key at each prompt in the command window, which indicates to use the default value.
  3. To change the default values shown in the form, type a value for the default:
    1. X scale factor in Default X Scale.
    2. Y scale factor in Default Y Scale.
    3. Z scale factor in Default Z Scale.
    4. Click Insert Block.
    5. Click in the graphics area where you want to insert the Block instance.
    6. Press the Enter key at each prompt in the command window, which indicates to use the default value.
  4. To specify your own values:
    1. Click Insert Block on the form.
    2. Click in the graphics area to set the Block instance's insertion point.
    3. 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.
  5. Examine the drawing.

NOTES:

  • Errors and the Block instance's scale factors are printed to Output.
  • To recreate this example:
  1. Right-click the topic and select to view the source.
  2. Save the file as an HTML file.
  3. Open the HTML file in your web browser.
  4. If using Windows Internet Explorer and running scripts is blocked, allow blocked content.

Default X Scale:    
Default Y Scale:    
Default Z Scale:    

Output


 




Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Prompt for Block Insertion Example (JS)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2023 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.