Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP to dimension text Radius/Straight of a line

5 REPLIES 5
Reply
Message 1 of 6
jhockley
1436 Views, 5 Replies

LISP to dimension text Radius/Straight of a line

Hi

 

New to the forum.

 

Could anyone one help with a LISP that adds a text to identify a radius/straight of a line (see attached jpg).

 

Could it:

 

Inserts perpendicular to line

Radius to 1 decimal place

Finishes with 'mR'

Straight line displays as 'STR'

 

I have tried doing this using dynamic blocks - doesnt work, and i have no programming knowledge so i'd be lost on actually writing LISP routines.

 

 

Thanks in advance

 

PS We use this a lot and would save immense amount of time

5 REPLIES 5
Message 2 of 6
Kent1Cooper
in reply to: jhockley


@jhockley wrote:

.... 

Could anyone one help with a LISP that adds a text to identify a radius/straight of a line ...:

 

Inserts perpendicular to line

Radius to 1 decimal place

Finishes with 'mR'

Straight line displays as 'STR'

....


Welcome to the Forums!

 

If a dimension's extension line would serve in place of the perpendicular line, perhaps with the DIMEXO System Variable set to 0 so that it touches the Polyline vertex, then a simple modification of this recent routine could do that.  It would just require applying "STR" as override text on all line-segment dimensions, using the radius rather than segment length as override and putting the right mode and precision and suffix on all arc-segment dimensions, and suppressing all dimension lines.  Using a Dimension Style that puts the text above the dimension line [the routine is built assuming text centered on the dimension line as in our standard style] would simplify the positioning -- right on the segment.  Does that sound like it would work for you?  If you really need a perpendicular line that looks like your image, that wouldn't be difficult to work into it, though the question arises whether all line-to-arc-segment intersections will always be tangents.

Kent Cooper, AIA
Message 3 of 6
Kent1Cooper
in reply to: Kent1Cooper


@Kent1Cooper wrote:
.... 

If a dimension's extension line would serve in place of the perpendicular line, ... then a simple modification of this recent routine could do that.  .... the question arises whether all line-to-arc-segment intersections will always be tangents.


Such as the attached [not quite as simple a modification as I expected, but not too bad].  And I didn't do the text-above-dimension line thing, because there was then no difference between the result when asking for the indicators inside vs. outside.

 

In limited testing, it also raises the question of the desired vertex marker at vertices between non-collinear line segments.  The attached puts two extension lines, which of course don't coincide the way they do between tangent line and arc segments, or two tangent arc segments, or two collinear line segments.  If you want only one marker, in that situation should it bisect the angle or something?

 

Search the file for four semicolons together ;;;; and consider the comments.  There may be other adjustments you want to make, but give this a shot.

Kent Cooper, AIA
Message 4 of 6
jhockley
in reply to: Kent1Cooper

thanks very much, i'll give it a shot when i get into work in the morning
Message 5 of 6
m_badran
in reply to: jhockley

Something like this . polyinfo

Message 6 of 6
Kent1Cooper
in reply to: m_badran


@mostafabadran wrote:

Something like this . polyinfo


[As useful as that may be for the right purpose, it's not at all like what the image attached to the first message shows.]

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost