LISP to dimension only width and length of a polyline

LISP to dimension only width and length of a polyline

ramirez.m.1989
Enthusiast Enthusiast
4,619 Views
8 Replies
Message 1 of 9

LISP to dimension only width and length of a polyline

ramirez.m.1989
Enthusiast
Enthusiast

 I need a routine that places the dimensions of the polyline, but only two dimensions (width and length).
I have a routine that places the dimensions but places the dimensions of each polyline, so some of them are left with 4 or 5 dimensions and I only
need 2.  

The dimensions must be associative. (In the example drawing they are not associative but they should be)

 

Attached example drawing.

 

Thanks.

0 Likes
4,620 Views
8 Replies
Replies (8)
Message 2 of 9

devitg
Advisor
Advisor

show your up to now , LISP 

 

0 Likes
Message 3 of 9

devitg
Advisor
Advisor

Hi Ramirez, as I can notice , such polylines are side walks, and by the layer name "CUBICACIÓN", parecería que necesitas saber las superficies de cada una {`seem to be you need to know each one area} 

 

Please tell us WHAT do you need to do, NOT the HOW you think it can be do.

Other 

put sidewalks in it´s own layer and the dims at a new layer.

 

 

0 Likes
Message 4 of 9

ramirez.m.1989
Enthusiast
Enthusiast

No, I do not need the areas, I just need the width and length of each polyline.

 
Attached drawing with separate layers.
 
Thanks.
0 Likes
Message 5 of 9

ramirez.m.1989
Enthusiast
Enthusiast

Attached lisp with what I found so far. It is from :  kimprojects.com/automatic-dimension-autocad/

 

 

 

Message 6 of 9

jtm2020hyo
Collaborator
Collaborator

AD-KIM lisp work good, but create dissociative dims.

 

Any AutoLisp expert can help us?

0 Likes
Message 7 of 9

Kent1Cooper
Consultant
Consultant

@ramirez.m.1989 wrote:

 I need a routine that places the dimensions of the polyline, but only two dimensions (width and length).
I have a routine ... some of them are left with 4 or 5 dimensions and I only need 2.  

....


Further difficulties if you're still watching after almost 4 years:

 

This one has 3 dimensions, not 2, I assume because its "width" is so different from one end to the other:

Kent1Cooper_0-1638560121854.png

How could a routine determine which two edges to Dimension?

And this one is closer to to rectangular, but isn't 4-sided, so again, figuring which 2 edges to Dimension would be challenging:

Kent1Cooper_1-1638560206610.png

??:

Kent1Cooper_2-1638560396817.png

[That one has its upper left edge sort-of Dimensioned, but it's really for the adjacent outline.]

 

Even more questionable:

Kent1Cooper_0-1638561996458.png

Neither Dimension on that one is of a single edge, and both Dimensions are between edges that are not parallel, and the Dimension lines are not parallel to the nearby edges of the outline, so what do they really mean?

 

Kent Cooper, AIA
0 Likes
Message 8 of 9

Kent1Cooper
Consultant
Consultant

@jtm2020hyo wrote:

AD-KIM lisp work good, but create dissociative dims.

Any AutoLisp expert can help us?


Try the attached DimPolyAssoc.lsp, with its DPI and DPO commands.  It's edited from DimPoly.lsp, to use Associative Dimensions if that is your current setting.

 

[It doesn't do only two sides, as in this Topic's request, but all edges like the one at Message 5.  And its source routine predates the possibility to Dimension arcs for length -- the DIMARC command -- so it uses override text on an angular Dimension.  That means the text content won't be correct after a Polyline arc segment is modified, but modifying a Polyline arc segment does really weird things even to DIMARC Dimensions, so you would have some redoing to do in either case.]

 

EDIT:
Replaced with version edited to use DIMARC arc-segment-length Dimensions.

Kent Cooper, AIA
Message 9 of 9

jtm2020hyo
Collaborator
Collaborator

awesome lisp.

 

It's possible to edit this lisp to create DIM-Lengths (dpi and dpo) for all selects 1D Objects? (Lines, Polylines, Arcs, Splines, etc)

 

EDIT: selection a Group with multiple polylines outside the visible space appears this message "Expects a single object.", but when I did zoom extent solve this.

 

Edit 2 : DPI and DPO drop error when Annotative Dim Style is current.

 

 

 

 

 

0 Likes