Simcoder Add Header and External File

Altair Forum User
Altair Forum User
Altair Employee
edited August 2023 in Community Q&A

Hello PSIM,

How can I add header file(.h) and external file(.c) on PSIM. I got the error when I tried to generate code.

image

 

Tagged:

Answers

  • Rhonda_20369
    Rhonda_20369 New Altair Community Member
    edited August 2023

    There are two ways to include external header files so that PSIM will know where to find it:

    1. Copy/move the file to the same folder as your PSIM schematic.

    2. In PSIM's "Options >> Set Path", add the path to the section "C Block Include Path".

    This is where you define the search path for the include files for C blocks. For C blocks, additional include files (such as header files) can be placed in any folder, and if this folder is added to C Block Include Path, PSIM will search for this folder and load the include files to the C blocks.