new-polygon ("npy")

See this command in the command table.

To access this command:

  • Digitize ribbon > Create > String > Polygon.

  • Using the command line, enter "new-polygon" and press ENTER.

  • Use the quick key combination "npy"

  • Display the Find Command screen, locate new-polygon and click Run.

Command Overview

Allows you to create a new closed string (polygon) in the 3D window by clicking in at least 3 locations. Clicking in more locations creates a polygon with more vertices.

  • If no strings object exists in memory, a new object is created when this command is run, displaying details of the new object immediately in the Current Objects toolbar. See The Current Objects Toolbar.

  • Selecting a different attribute value in the Current Objects toolbar will automatically start a new string.

  •  

Activity steps:

  1. Select the required snap and data selection settings. See Snapping to 3D Data.

  2. In the Current Objects toolbar, select the current object or create a new one.

  3. In the Current Objects toolbar, select the required Attribute Field and associated Attribute Value parameters.

  4. Run the command.

  5. Click to define the location of the polygon points.

  6. Cancel the command by clicking Done or pressing ESC.

Command Automation

You can automate by passing this command and parameters into oDmApp.ParseCommand(), using any COM-aware scripting language.

Note: For more information on scripting in Studio NPVS+, please refer to your Scripting Tutorial (Help > Scripting Tutorial).

Example Parameter String (JS):

oDmApp.ParseCommand("new-polygon @point=100.0,200.0,0.0,1 @attribute=GRADE,2.5";

Where:

  • @point=100.0,200.0,0.0,1 is the ParsePointArguments: An @point group of 4 comma-delimited values: X, Y, Z, and nButton. X, Y, and Z are numeric world coordinate values. nButton is an integer parsed as part of @point input; 1 is left mouse button behaviour, 2 is middle mouse button behaviour, and 4 is right mouse button behaviour.

  • @attribute=GRADE,2.5 is the ParseAttributeArguments: An attribute assignment token parsed into strColumnName and Datum.

  • GRADE is the strColumnName: String value naming the attribute column.

  • 2.5 is the Datum: Typed attribute value parsed from the attribute token.

Parameters Table

Parameter Description Reqd? Example Syntax
ParsePointArguments An @point group of 4 comma-delimited values: X, Y, Z, and nButton. X, Y, and Z are numeric world coordinate values. nButton is an integer parsed as part of @point input; 1 is left mouse button behaviour, 2 is middle mouse button behaviour, and 4 is right mouse button behaviour. Y @point=100.0,200.0,0.0,1
ParseAttributeArguments An attribute assignment token parsed into strColumnName and Datum. Y @attribute=GRADE,2.5
strColumnName String value naming the attribute column. Y GRADE
Datum Typed attribute value parsed from the attribute token. Y 2.5

Related topics and activities