Ets_Pj_Current_Scenario_Component_Import()
Note: Requires OPNET Development Kit
Abstract
Reads the specified input file as the new value for the corresponding component of current scenario.
Syntax
Ets_Pj_Current_Scenario_Component_Import (file_type, import_filename)
| Argument | Type | Description |
|---|---|---|
file_type |
EtsT_Pj_Scenario_Component_Type |
Type constant specifying which component to import (one of the values in Table 36 Project Package Symbolic Constants). |
import_filename |
const char * |
Base file name of the input file. |
Return Type
void
No return value.
Header
ets_api_pj.h
Details
The imported component replaces completely the existing component, if any, of the current scenario in the currently active project. That is, there is no attempt to merge the new information with any existing information. The import only affects the project's in-memory state, so the project must still be saved for the change to be complete.
The import_filename argument must be a base filename with no directory path or extension. The corresponding file must have the appropriate extension for the specified file type (for example, .nt.m for a network component) and reside in an recognized model directory, following the standard typed file lookup rules. If the file was created after the application was started up, the caller must refresh the model directory cache via the following call:
Ets_Command_Builtin_Exec ("rehash_dirs");
The project does not keep any reference to the input file, so the caller is free to remove, rename, or even keep it after the import.
This function incorporates the functionality of the deprecated function Ets_Model_Current_Tool_Set_By_Name() when called with the file_type EtsC_Pj_Scenario_Component_Network.