op_anim_viewer_close()

Abstract

Closes the specified viewer by removing its window and deallocating all of its retained drawings and other memory.

Syntax

op_anim_viewer_close (anvid)
Argument Type Description
anvid Anvid viewer ID
[This value is a numeric identifier which references the viewer to be closed.]

Return Type

void

no return value

Example

/* Determine interrupt type. */
itype = op_intrpt_type ();

/* Check for node failure interrupt. */
if (itype == OPC_INTRPT_FAIL)
	{
	/* Node is dead; close associated animation viewer and macros. */
	op_anim_viewer_close (local_vid);
	op_anim_macro_destroy (local_move_mid);
	op_anim_macro_destroy (local_comm_mid);
	}

Details

Once a viewer has been closed by this KP during a simulation, no further Anim package KPs should be called which reference the closed viewer’s ID (anvid).

In addition to the sources of viewer IDs listed in the Reference section, the symbolic constant OPC_ANIM_ANVID_PBSPEC can be used as a substitute viewer ID, indicating that the real viewer ID should be obtained from an active unlabeled custom animation probe.

Purpose

Provides a mechanism to remove a viewer window in the middle of an animation. This can be useful if a viewer is not displaying any information that is interesting after a certain time, and will otherwise just occupy valuable screen space that could be used for other viewers.

Errors

  • Diagnostic Error: Animation viewer ID (<anvid>) is out-of-range. (due to an invalid value for the anvid argument)

Reference

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