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-polygonand 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:
-
Select the required snap and data selection settings. See Snapping to 3D Data.
-
In the Current Objects toolbar, select the current object or create a new one.
-
In the Current Objects toolbar, select the required Attribute Field and associated Attribute Value parameters.
-
Run the command.
-
Click to define the location of the polygon points.
-
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):
Where:
-
@point=100.0,200.0,0.0,1is theParsePointArguments: 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.5is theParseAttributeArguments: An attribute assignment token parsed into strColumnName and Datum. -
GRADEis thestrColumnName: String value naming the attribute column. -
2.5is theDatum: 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
