Ad

Monday, January 19, 2009

Distances Between Two Points

In Civil 3D there is an inquiry toolbar that contains the CGSLIST command. The command provides the slope information for an object or distance between points.

image

Selecting an object provides the slope information for the segment selected and not the entire length of the object. The Points option let you select two points and it will return the inquiry between those two points.

The program works as intended, but could use some improvements especially if you want to use points most of the time instead of an object. The code below does the same thing as the CGSLIST command except for the object portion and pulling the number precision from the drawing.

image

The Call CGSLST at the end makes it loop through the command again. The program will stop once a point is not selected. You can add the vba through the cui. The completed code may be found here.

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad