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.

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.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com