simplify-string ("sps")

See this command in the command table.

To access this command:

  • Digitize ribbon > Condition > Condition > Simplify String.

  • Using the command line, enter "simplify-string" and press ENTER.

  • Use the quick key combination "sps".

  • Display the Find Command screen, locate simplify-string and click Run.

Command Overview

Reduce the number of points on a string whilst attempting to retain a shape most representative of the pre-simplified version. Start and end points of the string are not adjusted with this command.

Note: this is similar, and can be used as an alternative to, the condition-string ("cond") or reduce-points ("red") commands.

Command steps:

  1. Digitize or load string data.

  2. Optionally, select the string data to be simplified. If no data is preselected, you can selected it after the command starts.

  3. Run the command.

  4. On the Simplify String screen, enter a Simplification Distance. This is the chord length within which a single point is added. Smaller values lead to a higher number of remaining points.

  5. If no data was preselected, pick string data in any 3D window.

    String data is simplified.

  6. If string data was not preselected, click Done to complete the command.

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("simplify-string @point=100.0,200.0,0.0,12 '0.5'";

Where:

  • @point=100.0,200.0,0.0,12 is the ParsePointArguments: X,Y,Z,nButton.

  • '0.5' is the simplificationDistanceParam: a string value parsed as numeric simplification distance and must be > 0.

Parameters Table

Parameter Description Reqd? Example Syntax
ParsePointArguments

X,Y,Z,nButton.

  • X is a numeric (double) world coordinate value.

  • Y is a numeric (double) world coordinate value.

  • Z is a numeric (double) world coordinate value.

  • nButton is an integer value parsed as part of @point input. Enumerated types are:

    • 1: Left mouse button behaviour

    • 2: Middle mouse button behaviour

    • 4: Right mouse button behaviour

Y @point=100.0,200.0,0.0,12
simplificationDistanceParam

A string value parsed as numeric simplification distance and must be > 0.

Y '0.5'

Related topics and activities