Ets_Tool_Open()

Note: Requires OPNET Development Kit

Abstract

Opens and installs an editor.

Syntax

Ets_Tool_Open (editor_type_name, model_name)
Argument Type Description
editor_type_name const char * Name of editor to open (see Details)
model_name const char * A valid model name, empty, or OPC_NIL.

Return Type

EtsT_Compcode

EtsC_Compcode_Failure if either name is invalid; EtsC_Compcode_Success otherwise.

ets_api_tool.h

Details

This function opens an editor and makes it the current one (that is, it makes the editor window topmost and active). The editor is opened with the named model or, if the model name is OPC_NIL or empty, with a new, unsaved model. If the specified editor and model combination is already open, that editor is made active.

If either the editor or model name doesn't exist, nothing is opened and the function returns EtsC_Compcode_Failure.

The editor_type_name argument must be one of the editor names defined in an ETS configuration file (such as <reldir>\sys\configs\modeler.ets). Valid editor names include "System" and "project".

When used as follows, this function incorporates the functionality of the deprecated function Ets_Model_New_Tool_Set_By_Name():

  1. Call Ets_Tool_Open() with an empty string for the model_name argument.
  2. Call Ets_Pj_Current_Scenario_Component_Import() with the file_type EtsC_Pj_Scenario_Component_Network.

For example:

/* Open an empty Project Editor */
Ets_Tool_Open ("project", OPC_NIL);

/* Import the desired network model. */
Ets_Pj_Current_Scenario_Component_Import (EtsC_Pj_Scenario_Component_Network,
	<filename>);

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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