Question:
How can I create and save a block using JavaScript?
Answer:
To create and save a block with JavaScript, proceed as follows:
- Open the Dlubal Center | Blocks.
- Select any block that contains JavaScript.
- In the "Edit Blocks'" dialog box, switch to the "JavaScript" tab (Image 01).
- Click the ► Image | Open https://www.dlubal.com/en-US/img/027532 button to do your programming directly in the "JavaScript" tab. As an alternative, you can use the ► Image | Browse https://www.dlubal.com/en-US/img/042518 button to import a JavaScript file.
- Click the ► Image | Apply https://www.dlubal.com/en-US/img/029800 button to apply the JavaScript.
- Then, save the block by clicking the ► Image | Save Block https://www.dlubal.com/en-US/img/042519 button.
- In the "Save as Block" dialog box, enter the name of the block, and make the settings for the block categorization (Image 02).
► Image | Dialog Box "Edit Block", Tab "JavaScript" https://www.dlubal.com/en/img/042522
► Image | Dialog Box "Save as Block" https://www.dlubal.com/en/img/042520