\rhead{\bf MC\_AgentAttachFile()}
\noindent
\vspace{5pt}
\rule{6.5in}{0.015in}
\noindent
\phantomsection
{\LARGE \bf MC\_AgentAttachFile()\index{MC\_AgentAttachFile()}}\\
\addcontentsline{toc}{section}{MC\_AgentAttachFile()}

\noindent
{\bf Synopsis}\\
{\bf \#include $<$libmc.h$>$}\\
{\bf int MC\_AgentAttachFile}({\bf MCAgent\_t} $agent$, 
                                  {\bf const char*} $name$,
                                  {\bf const char*} $filepath$,
																	);\\

\noindent
{\bf Purpose}\\
This function is used to attach a file to an agent.\\

\noindent
{\bf Return Value}\\
The function returns 0 on success or a non-zero error code on failure.\\

\noindent
{\bf Parameters}
\vspace{-0.1in}
\begin{description}
\item
\begin{tabular}{p{30 mm}p{125 mm}} 
$agent$ & A fully initialized agent handle.\\
$name$ & An alias to identify the attached file.\\
$filepath$ & The path to the file. Local paths are calculated from the
execution directory of the agency.\\
\end{tabular}
\end{description}

\noindent
{\bf Description}\\
This function is used to attach a file to an agent. The file may later be retrieved
with the functions \texttt{MC\_AgentRetrieveFile()} or
\texttt{mc\_AgentRetrieveFile()}. The files are attached to the
agent's currently executing task.

\noindent
{\bf Example}\\
\noindent
{\footnotesize\verbatiminput{../demos/miscellaneous/agent_file_attachment/task1.c}}
{\footnotesize\verbatiminput{../demos/miscellaneous/agent_file_attachment/task2.c}}

\noindent
{\bf See Also}\\
\texttt{MC\_AgentRetrieveFile(), MC\_AgentListFiles()}

%\CPlot::\DataThreeD(), \CPlot::\DataFile(), \CPlot::\Plotting(), \plotxy().\\
