Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Code indentation in C-script Block

0 votes
146 views
How can we indent the blocks of code in one go in c-script as it doesnt automatically do it?
asked Nov 26, 2021 by adeel1 (27 points)

1 Answer

0 votes
 
Best answer
There is not a mechanism to block-indent text within the C-Script block.  At the moment, the C-Script is not so much meant as a code development environment but rather as a means to implement models that cannot be expressed easily (or at all) with block diagrams. Enhancing the C-Script block with more IDE-like functionality is on the development roadmap.

However, when writing C-Scripts myself I either a) copy/paste the code into a separate text editor, make any necessary formatting changes, and bring the modified code back into the PLECS environment or b) make use of external files (see a simple example here: https://forum.plexim.com/3211/include-paths-in-c-scripts)
answered Dec 2, 2021 by Bryan Lieblick (1,069 points)
selected Feb 15 by adeel1
...