711x
005398
2023-07-26

Blocks with JavaScript

How can I create and save a block using JavaScript?


Answer:

To create and save a block with JavaScript, proceed as follows:

  1. In the Navigator – Data, right-click the "Blocks" entry under "Special Objects" and select "New Block" from the menu.
  2. In the "New Block" dialog box, switch to the "JavaScript" tab (Image 1).
  3. Click the Blocked , button to program directly in the "JavaScript" tab. As an alternative, you can use the Opening Model button to import a JavaScript file.
  4. Click the Apply , button to apply the JavaScript.
  5. Then, use the Save Block button to save the block.
  6. In the "Save as Block" dialog box, enter the name of the block, and make the settings for the block categorization (Image 02).

Author

Ms. von Bloh provides technical support for our customers and is responsible for the development of the SHAPE‑THIN program as well as steel and aluminum structures.



;