Dashed line where each part of it is individual - how to rejoin?

Dashed line where each part of it is individual - how to rejoin?

dariawerynska
Enthusiast Enthusiast
8,817 Views
18 Replies
Message 1 of 19

Dashed line where each part of it is individual - how to rejoin?

dariawerynska
Enthusiast
Enthusiast

Hello,

recently I received a city .dwg map where the streets and urban blocks are all marked by a dashed line, or I though it was a dashed line...

I need it to be continuous so I thought, ok, I'll just change the line type and then... whoops! 

It appeares that EACH TINY PART of it is a separate line and by no means I can join it (the example in the attachment).

Is there any way these thousands of lines can form pieces of continous lines?

 

 

cad.png

 

john.vellek has embedded your image(s) for clarity

 

Thank you for any help!

0 Likes
8,818 Views
18 Replies
Replies (18)
Message 2 of 19

pendean
Community Legend
Community Legend
If JOIN command can't help with most of those lines then you are stuck with the file as is.
0 Likes
Message 3 of 19

gotphish001
Advisor
Advisor

Joining polylines

The PEDIT command has its own Join option. Start the PEDIT command and at the first prompt, choose the Multiple option and select both objects. Then use the Join option. At the Enter fuzz distance or [Jointype] <5.0000>: prompt, enter a number larger than the gap to close it, and end the command.

Use the Jointype suboption to specify how the gap is closed. The Extend method extends or trims segments to the nearest endpoints. The Add method adds a straight segment between the two nearest endpoints. The Both method tries to extend or trim, but if it can’t, adds a segment.



Nick DiPietro
Cad Manager/Monkey

Message 4 of 19

john.vellek
Alumni
Alumni

Hi @dariawerynska,

 

While there is not likely a way to connect these lines automatically, these look like the would be easy to trace over.  If you are willing to share the file I am happy to take a look at it for you.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 5 of 19

cadffm
Consultant
Consultant

Hi Daria,

 

perhaps good enough for your goal: Create a PDF of (only) these lines, and one large line - foreasy rescaling later if it is needed.

Now use PDFIMPORT and select the lower right option in dialog.

 

Thats quick, dirty, but for someone the best solution.

Sebastian

Message 6 of 19

dariawerynska
Enthusiast
Enthusiast

I attach part of the .dwg. It's the whole plan for Rome and it's large, but the rest looks pretty much the same.

Maybe you can find a way, thank you 🙂

0 Likes
Message 7 of 19

john.vellek
Alumni
Alumni

Hi @dariawerynska,

 

I was actually considering the same option that @CADffm wisely suggested.  I made a quick video to show the process. You will see that I placed a reference line in the file before producing the PDF. This lets me scale the geometry after PDFIMPORT by reference to a known size.

 

As you will see, this method is not 100% because some of the gaps are too large but it might get you much further to a complete file. If you would like to include the whole map file I am happy to work a bit on it for you if this looks like it will work your purposes.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.

 

 

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 8 of 19

gotphish001
Advisor
Advisor

The join with fuzz distance I mentioned above doesn't work because there are 3d polylines. You can use my attached lisp to change the 3d polylines to 2d polyline. At that point you can use the pedit>mulitple>convert Y>join>join type>both> I set fuzz distance to 3 for the one I tried it on to get it to work. 

 

You will still need to do it in some sections as when I tried to do the entire drawing at once, I got a few extra line that it added.



Nick DiPietro
Cad Manager/Monkey

Message 9 of 19

gotphish001
Advisor
Advisor

I made a screencast. 

 

 

 



Nick DiPietro
Cad Manager/Monkey

Message 10 of 19

dariawerynska
Enthusiast
Enthusiast

Wow! Thank you for your devotion, time and wise tips. This forum never stops to amaze me 🙂

This trick I will surely use many times!

 

The PDF solution is the closest to the goal but there are many gaps still left and the work on the whole map seems to be too time-consuming. I think I have to change my vision of the way I will create graphic maps for analysis.

0 Likes
Message 11 of 19

john.vellek
Alumni
Alumni

Hi @dariawerynska,

 

Try the PODF method and then follow up with the method described by @gotphish001.  I think overall you will get pretty good results. Again, you are welcome to post your large file in its entirety and I can take a more thorough look at it for you.

 

If you are starting from a raster map there are other programs that might make this process easier such as AutoCAD Raster Design.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 12 of 19

gotphish001
Advisor
Advisor

I realized what the extra lines I get when I try to do the entire drawing at once are. It makes the entire thing 1 polyline, so it goes around and joins the lines in a lot but when it gets all the way around it jumps somewhere else to continue the same polyline. So if you did the entire drawing at once, you'd need to go in and trim out the part of the polyline that jumps to the next section and then connect the two ends together for each lot. At least you'd only need to connect one thing for what would end up being each lot instead of multiple. 

 

I'd suggest for your bigger drawing. Draw some construction lines on x and y to divide it up into a grid or just use the grid. I like construction lines because I can make them some stand out color. Then do a grid section at a time as big as you think you can handle without the extra connecting polylines getting too confusing. 

 

Edit: It did take a little while to use the lisp and then the pedit command on the entire drawing you posted. I thought it froze, but I let it go. Took maybe a full minute or so to complete. I'd probably do it as I said with it broken up with construction lines or you might melt your computer trying to do it all at once. It's a lot of calculations. 



Nick DiPietro
Cad Manager/Monkey

Message 13 of 19

Kent1Cooper
Consultant
Consultant

I was thinking another thing you can experiment with is the HPGAPTOL System Variable [Hatch Pattern Gap TOLerance].  Read about it, set it to a large-enough value for the gaps, and Hatch in the areas [by the Select-objects option, not picking inside them].  Unfortunately, the Recreate Boundary option in HATCHEDIT recreates the separate pieces, not the perimeter as a closed object as I was hoping.  But there may be routines out there that can do that.

 

But the PEDIT / Multiple / {select} / Join approach with a large-enough gap tolerance is easier.  You can do that to the whole map, and don't need to do each block separately -- with an appropriate fuzz size, it will make each block its own Polyline, all at once.

Kent Cooper, AIA
Message 14 of 19

gotphish001
Advisor
Advisor

@Kent1Cooper that was a genius idea. I was let down a little when I got to the part where you said it still drew segments for the boundaries. Boo!

 

Were you able to get it to make separate polylines for the lots with pedit? Even with my fuzz set to like 3 after it completed a lot it would jump 50 or a number bigger than 3 to the next one. Well beyond the setting of 3. That's why at first I thought it was just adding extra lines like it can with flatten or just some math calculation rounding mistake or something like that.

 

These are the things I like to troubleshoot. It's much more fun brainstorming and trying new ways to get something done than it is looking through settings. I'm probably the only one in the history of my HS that liked doing geometry proofs. 



Nick DiPietro
Cad Manager/Monkey

Message 15 of 19

Kent1Cooper
Consultant
Consultant

@gotphish001 wrote:

....@Kent1Cooper

Were you able to get it to make separate polylines for the lots with pedit? Even with my fuzz set to like 3 after it completed a lot it would jump 50 or a number bigger than 3 to the next one. .... 


I had tried in a very small-scale experiment, just to confirm that it doesn't put everything  selected into one  Polyline in that kind of situation.  In that sample drawing, it didn't do what you describe, but it didn't "succeed" broadly speaking, either.

 

The drawing has 3DPolylines [they can't be Pedit/Joined], as well as some Polylines that double back on themselves, and various other issues that complicate it.  I Exploded everything so they would all be Lines, and I noticed one place with 3  Lines of different lengths on top of each other, so I ran Overkill to get rid of some of the overlaps, and Flatten just in case.  Then I tried it, and it connected a bunch of stuff, but far from everything.  Some of the remaining gaps got closed by running it again.  But it didn't  do any jumping great distances like that.

Kent Cooper, AIA
0 Likes
Message 16 of 19

gotphish001
Advisor
Advisor

I tried adding in the overkill and flatten to see if it helped. Ran that 3d-2d ployline lisp, join command with join type as both and gap of 3. It still made it all one polyline. You can see where it jumps long distances. You'd think it would work just like normal join and join everything it could and drop the rest of the gaps over 3. I'm short on things I need to accomplish on friday so this is turning into a time waster for me to play around with. 

 

Capture.JPG



Nick DiPietro
Cad Manager/Monkey

Message 17 of 19

Kent1Cooper
Consultant
Consultant

@gotphish001 wrote:

.... Ran that 3d-2d ployline lisp, join command with join type as both and gap of 3. .... 

 


Does the same thing happen if you EXPLODE rather than use the 3d-2d-Polyline routine, making everything into Lines, rather than some converted 2D Polylines along with other entity types that weren't 3DPolylines to begin with?  I was using PEDIT and its Join option, rather than the JOIN command, but it came up short in a different way -- might JOIN starting from Lines work?  [I haven't tried it.]

Kent Cooper, AIA
0 Likes
Message 18 of 19

ВeekeeCZ
Consultant
Consultant

I've tried that real quick. It looks like using ET's MPEDIT gives much better result than PEDIT (not joined all together).

My recommended workflow: EXPLODE, FLATTEN, OVERKILL, MPEDIT w/ join both 2.6

See the result (I didn't use OVERKILL on this - I should have - that's why there still is dashed line in the middle of picture)

 

image.png

Message 19 of 19

Sharif.MashahidG2UDG
Explorer
Explorer

Thanks worked perfectly

0 Likes