Ansys Optics Help Center home page
Products
  • Ansys Optics
  • Downloads
  • What's new
  • Ansys Help
Solutions
  • Lumerical
  • Zemax
  • Speos
Learn
  • Ansys Innovation Courses (AIC)
  • Ansys Learning Hub (ALH)
  • Webinars
  • On-Demand Webinars
  • White Papers
Get Help
  • Welcome Guide
  • Ansys Learning Forum (ALF)
  • Lumerical Ideas Exchange (IX)
  • Ansys Support (ACSS)
  • How to Register for Support
Evaluate for Free
  • Lumerical
  • Zemax
  • Speos
  1. Ansys Optics
  2. Scripting Language
  3. Commands

TOP

getnumber - Script command

FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT

Gets the number of objects that are selected.

Syntax

Description

out = getnumber;

Returns the number of objects that are selected;

Example

Add 2 microns to the radius of all objects named "circle".

select("circle");
for (i=1:getnumber) {
 rad=get("radius",i);
 set("radius",rad+2e-6,i);
}

See Also

Manipulating objects , get , getnamed , getnamednumber , set

Associated files

Related articles

  • getnamednumber - Script command
  • get - Script command
  • Lumerical scripting language - By category
  • FDTD product reference manual
  • How to create or update your Ansys Lumerical user account (deprecated)

Products

  • Ansys Optics
  • Downloads
  • What's new
  • Ansys Help

Solutions

  • Lumerical
  • Zemax
  • Speos

Learn

  • Ansys Innovation Courses
  • Ansys Learning Hub
  • Webinars
  • On-Demand Webinars
  • White Papers

Get Help

  • Ansys Learning Forum
  • Lumerical Ideas Exchange
  • Ansys Support
  • How to Register for Support

Evaluate for Free

  • Lumerical
  • Zemax
  • Speos
Hear the Latest from Ansys

Copyright 2025 Ansys Canada Ltd.


Ansys
  • Terms of Service
  • Cookie Policy
  • Privacy Policy
  • Legal Notices