# \#blocks

**URL:** https://forum.plexim.com/tag/blocks/71.md

[Latest](https://forum.plexim.com/latest.md) · [Categories](https://forum.plexim.com/categories.md) · [Tags](https://forum.plexim.com/tags.md)

---

## [Creating blocks in Plecs with scripts](https://forum.plexim.com/t/creating-blocks-in-plecs-with-scripts/1386)

<div class="topic-metadata">

**Author:** [@Kristian\_Pedersen](https://forum.plexim.com/u/Kristian_Pedersen)\
**Replies:** 3\
**Last updated:** [August 21, 2024, 11:32am UTC](https://forum.plexim.com/t/creating-blocks-in-plecs-with-scripts/1386 "2024-08-21T11:32:20Z")

</div>

Is it possible to create blocks in Plecs from a script? Previously, in Simulink I have created a custom library with masked S-function blocks and saved this as a library all from the same Matlab script. I was wondering …

---

## [Syntax for writing functions in function blocks](https://forum.plexim.com/t/syntax-for-writing-functions-in-function-blocks/1385)

<div class="topic-metadata">

**Author:** [@JuanMa\_277](https://forum.plexim.com/u/JuanMa_277)\
**Replies:** 4\
**Last updated:** [August 16, 2024, 12:17pm UTC](https://forum.plexim.com/t/syntax-for-writing-functions-in-function-blocks/1385 "2024-08-16T12:17:56Z")

</div>

I would like to ask you about how to write functions in function blocks. The manual explains that it follows the C syntax. But it is not clear how. I want to use a function block to calculate the angle between variables…

---

## [Copying blocks between 2 different blockset files](https://forum.plexim.com/t/copying-blocks-between-2-different-blockset-files/1291)

<div class="topic-metadata">

**Author:** [@Mohammed\_Shamshuddin](https://forum.plexim.com/u/Mohammed_Shamshuddin)\
**Replies:** 1\
**Last updated:** [December 4, 2023, 4:40pm UTC](https://forum.plexim.com/t/copying-blocks-between-2-different-blockset-files/1291 "2023-12-04T16:40:08Z")

</div>

Is there a way to copy blocks from Matlab/PLECS Blockset model file to another MATLAB/PLECS blockset. For example I have a script in one blockset file, I cannot use this in another file.
