rookie37 Posted August 28, 2008 Posted August 28, 2008 I need a lisp program. I'm not sure it is practical It will draw a pline by tracing over another pline. It will delete the old and keep the new. Quote
fuccaro Posted August 28, 2008 Posted August 28, 2008 Can't you just copy it in top of itself and delete the previous one? (entmake (entget (setq l (car (entsel))))) (entdel l) Quote
rookie37 Posted August 29, 2008 Author Posted August 29, 2008 no The reason why I trace over the pline is because it is a mess. It was drawn by another company. Each company is different. I don't understand what is wrong but it could take 20 minutes trying different things to modify this pline. Some plines are 3d, some are drawn with another cad package. Some plines are nested blocks or xrefs It is often easier to trace over than to modify the pline I was thinking a program can define all points on a pline. Draw a pline using those points Quote
fuccaro Posted August 31, 2008 Posted August 31, 2008 but if you use all the points from the old polyline, the new one will be exactly same shaped as the old one... Quote
bonacad Posted August 31, 2008 Posted August 31, 2008 if the dwg is mess, i recommend: flatten.lsp routine, then brp.routine, then from Express tools, command OVERKILL, & then acad command LAYTRANS for straight layers. in order that U found logical. salute Flatten.lsp BRP.LSP Quote
rookie37 Posted September 1, 2008 Author Posted September 1, 2008 but if you use all the points from the old polyline, the new one will be exactly same shaped as the old one... That's what I would have thought. A lisp program would repeat the problem. However, when we do it manually all the time as we found this the fastest way. Example A pipe is 600 meters drawn as a 600 long pline. It has only 5 bends in 600 meters. The ployline is kinda sorta made up of 48 separate plines, lines or I don't know what. To make a long story short, it could have been constructed from only 5 straight lines. If I select it, It shows as only one entity. However, I can't modify the linetype. I have spent hours playing with ltgen, ltscale, redrawall, flatten and have needed to take a valium afterwards. The only way to modify the linetype is to explode it. then do a pedit join 48 times and only attempting to join one adjacent segments each time. This is the only way to fix some of them. Sometime the segments refuse to join. Perhaps it is drawn that way to generate a BOM of 48 pipes required for the pipeline Drawn manually, I would only use 5 points. Even though a lisp program would draw it with 48 points, it will draw it with a pline instead of something strange. Quote
rookie37 Posted September 1, 2008 Author Posted September 1, 2008 Sorry I should have explained the problem in my first post but I was busy packaging a letter bomb intended for the originator of this drawing Quote
fuccaro Posted September 1, 2008 Posted September 1, 2008 A pipe is 600 meters drawn as a 600 long pline. It has only 5 bends in 600 meters. The ployline is kinda sorta made up of 48 separate plines, lines or I don't know what.In AutoCAd 2006 I would try the OVERKILL command. It has several settings. Quote
CAB Posted September 1, 2008 Posted September 1, 2008 rookie37. Can you post a sample DWG with just one or more of the worst case examples? Quote
rookie37 Posted September 2, 2008 Author Posted September 2, 2008 Here is one. I don't know if it's the worst. I couldn't modify it faster than redrawing it. You may very well find a way. However, we get drawings from many companies and with it, different problems with polylines. You may get this one to work but perhaps not the next. I thought it may be faster to write a lsp that will trace over. I have been at this place a short time. It is a big place with 30 offices. The rest of the gang have long abandonded any attempt to modify plines. pline sample.dwg Quote
eldon Posted September 2, 2008 Posted September 2, 2008 I managed to make it all one polyline quite simply manually, and I expect you could write a macro to do multiple polylines. I exploded the polyline, then moved all the lines @0,0,1e99, then moved it @0,0,-1e99. This has the effect of flattening by moving everything to such a huge height, that AutoCAD gets confused with small level differences, and says that they are all at the same level, so that when you move them down again (@0,0,-1e99), all the levels are at zero. Then I started PEDIT, and chose one line, then option Join, and typed ALL. Autocad will only join touching lines, so the unwanted lines are discarded. I didn't time myself, but it wasn't long and in a drawing with many polylines, the explode and move could be done with the whole drawing, and even the PEDIT with multiple option could speed up things. If you do start a polyline to trace over, as long as you start the first point with a z of zero, then all the rest of the polyline will be at zero, and you just click on the endpoints of the lines to trace it. Quote
CAB Posted September 2, 2008 Posted September 2, 2008 Note that the Express Tools "Flatten" does a good job on this type of pline. I even have some LISP routine that will flatten this type of pline. Do you have any that can't be flattened using "Flatten"? If you want to use Express Tools Flatten only on plines you can use the "Select Routine" first. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.