Autolisp possibilities

Autolisp possibilities

RobinCris
Contributor Contributor
264 Views
1 Reply
Message 1 of 2

Autolisp possibilities

RobinCris
Contributor
Contributor

I will need to test a large amount of file if they build correctly.
I want to understand what I can or can't do by using lisps.

 

Every file have multiple layers.

each layer include polylines and lines only.

 

1. I need to check if all the polylines are close polyline. I guess this is easy because I know there is a property with this value. If an Open one is found, I need the lisp to close it.

2. I need all the polylines to be untiClockWise. How can a lisp check it?

3. If there are Non-Staight lines by mustake. (|x1-x2|<8 or |y1-y2|<8). select it but let me dicide if to stop and fix it and continue looking.

4. To check if there are two point close to each other in the same layer. (|x1-x2| < 5 and |y1-y2| <5). If yes. need the lisp to select it and let me correct it

5. This one is more tricky. To Check if the is a point next to or on a another line but I have the formula to check this also.
6. Need to update the  thickness of the lines in every layer according to parameters.

 

Is there anything in here that can not be done in autolisp?

Is it too heavy for autolisp to check all the points against all the polyline lines?

What problems do you see it face?

 

 

Please advice.

Thank you

0 Likes
265 Views
1 Reply
Reply (1)
Message 2 of 2

Kent1Cooper
Consultant
Consultant

I think all of that could be done, one way or another.  Some comments/questions:

 

On 2, Search the Forums [or just this one], where you will find several threads about determining whether a Polyline was drawn in the clockwise or anticlockwise direction.

 

On 3, another Search will find several threads about regularizing Lines, some about forcing them to be orthogonal [for instance, rotating them about their midpoints to the closest orthogonal direction] and others about forcing their endpoints to fall on grid locations, which for small-enough differences from orthogonal directions will have the same effect, depending on the grid size specified.

 

In 4 & 5, you make reference to "points."  Do you mean Point entities, or do you mean endpoints and vertices of Lines and Polylines?

 

On 4, if in answer to the question above you mean endpoints and vertices by "points," does "too close to each other" apply to points only on the same object [i.e. a Line or a Polyline segment that is too short], or does it apply to points on different objects [i.e. objects coming too close to each other]?

 

How much work it is for a routine to check every location against every object depends on how large the drawings are, but it is certainly possible.

Kent Cooper, AIA
0 Likes