Skip to Main Content Skip to Search
Product Documentation

add - Add files to active project in IDE

Syntax

IDE_Obj.add(filename,filetype)

IDEs

This function supports the following IDEs:

Description

Use IDE_Obj.add(filename,filetype) to add an existing file to the active project in the IDE. Using the add function is equivalent to selecting Project > Add Files to Project in the IDE.

Before using add:

You can add any file type your IDE supports to your project. Consult the documentation for your IDE for detailed information about supported file types.

All Supported File Types and Extensions

File TypeExtensions SupportedCCS IDE Project Folder

C/C++ source files

.c, .cpp, .cc, .cxx, .sa, .h,.hpp,.hxx

Source

Assembly source files

.a*, .s* (excluding .sa), .dsp

Source

Object and library files

.o*, .lib, .doj, .dlb

Libraries

Linker command file

.cmd, .ldf

Project Name

VDK support file.vdkNot applicable

DSP/BIOS file (only with CCS IDE)

.tcf

DSP/BIOS Config

Input Arguments

add places the file specified by filename in the active project in the IDE.

IDE_Obj

IDE_Obj is a handle for an instance of the IDE. Before using a method, the constructor function for your IDE to create IDE_Obj.

filename

filename is the name of the file to add to the active IDE project.

If you supply a filename with no path or with a relative path, your coder product searches the IDE working folder first. It then searches the folders on your MATLAB® path. Add supported file types shown in the preceding table.

filetype

filetype is an optional argument that specifies the file type. For example, 'lib', 'src', 'header'.

Examples

Start by creating an IDE handle object, such as IDE_Obj using the constructor for your IDE. Then enter the following commands:

IDE_Obj.new('myproject','project');  % Create a new project. 

IDE_Obj.add('sourcefile.c'); % Add a C source file.

See Also

activate | cd | new | open | remove

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS