Slope_Ro

Short description

Purpose: Compute and report a simplified slope ratio and angle between two user-picked points Run style: Interactive two-point measurement with no drawing modifications Standard: Uses a fixed 12-unit horizontal run for imperial slope representation Output: Displays slope ratio and angle through an alert dialog only
slope ro

Command:

Command: SLOPE_01 Start: User picks a start point Next: User picks an end point Action: Calculates ratio rise:run (simplified), computes angle in degrees, displays both

Description:

This routine requests two points from the user, computes the vertical and horizontal differences, converts them into a simplified rise-over-run ratio based on a constant 12-unit run, and calculates the slope angle using arctangent mathematics. The resulting slope and angle are shown in a dialog box, allowing quick field verification without producing any entities or altering the drawing. The routine cleans up after itself by restoring BLIPMODE and CMDECHO system variables.

Helper function: (if any)​

System variable handling — Disables BLIPMODE and CMDECHO temporarily for clean operationSlope formula — Computes slope as |ΔY ÷ ΔX| with protection for division by zeroRatio reduction — Uses repeated GCD to simplify rise and run until they cannot be reduced furtherAngle calculation — Uses ATAN then converts radians to degreesUndo grouping — Begins an UNDO group to encapsulate any future extensions

Functionalities:

Two-point slope measurement — Uses user input for start and end pointsImperial 12-run standard — Converts slope to a rise-per-12-units formatAutomatic ratio simplification — Ensures output is reduced (e.g., 12:6 → 2:1)Angle reporting — Provides the slope angle with two decimal precisionError-safe logic — Prevents zero-division and handles flat slopes correctlyClean environment — Restores system variables on exit

Result:

Displayed slope ratio — Presented as Slope_Ro: run:rise after simplificationDisplayed slope angle — Angle shown in degrees with two decimalsNo geometry created — Does not draw text, objects, or symbolsUseful for quick checks — Ideal for rapid field/plan slope validationEnvironment restored — BLIPMODE and CMDECHO returned to original values

Images, animations etc.

Pixel

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x