Bearing and Distance Label Orientation

Bearing and Distance Label Orientation

Anonymous
Not applicable
5,372 Views
21 Replies
Message 1 of 22

Bearing and Distance Label Orientation

Anonymous
Not applicable

Hello everyone! I found this AutoLisp on one of the forums to label lines with a bearing and distance callout... created by: Bruno Valsecchi. 

This is attached as (Original Lisp)... This uses the (plab) command to use any line you choose and bring up the units pop up and label each line with the bearing and distance callout, which works amazing. 

 

I updated some things and changed the command to (label). This is also attached. 

 

I was wondering if anyone could adjust my updated lisp to fit with a better orientation to fit within smaller lines? As shown below:Original Orientation from Lisp.PNGUpdated Orientation.PNG

 

0 Likes
Accepted solutions (2)
5,373 Views
21 Replies
Replies (21)
Message 21 of 22

worldend835
Explorer
Explorer

Hello sir I am very interested in your lisp. and it have been a great help in our work... Can I ask for the simpler lisp. that only provides the Longitude, Degrees, Minutes(should be in two figures i.e. 06), Latitude, Length(should be in hundredths only) and Label of Length into Meters should be "M." for example:

Surveyors.png

Thank you very much for your consideration in full filling my request.

0 Likes
Message 22 of 22

Kent1Cooper
Consultant
Consultant

@worldend835 wrote:

... the Longitude, Degrees, Minutes(should be in two figures i.e. 06), Latitude, Length(should be in hundredths only) and Label of Length into Meters should be "M." ....


Read about the (angtos), (rtos) and (strcat) functions in the AutoLisp Reference.  In the first two, at a quick glance it looks like their use in the code does not include units or precision arguments, so whatever your current settings are would be used.  If you don't want to set your UNITS for those modes and precision levels, you can add units and precision arguments to those functions in the code.  Add the "M" at the end of the (strcat) function that builds the text content.

 

EDIT:  I'm now noticing the 5' that you would prefer to be 05'.  The above won't fix that for you, but it could be done with a fair amount of code to dig the string apart and find the minutes part, and add a leading zero if there's only one character there.

Kent Cooper, AIA