amb2301 Posted November 17, 2020 Share Posted November 17, 2020 (edited) hi friends, (please check the attached sample file ) i need to create a continuous boundary(black pline-output) line from the marked lots(red lined-input), likewise i need to do for 1000+ boundaries with the offset of 0.25m from the lot property lines, lot lines are broken into many small lines, so its taking very long time to offset each lines & joining all offset lines into 1 boundary, Is there any lisp to make this offset work easier... Hope Experts here may help me. Thanks in Advance. offset sample.dwg Edited November 17, 2020 by amb2301 Quote Link to comment Share on other sites More sharing options...
pkenewell Posted November 17, 2020 Share Posted November 17, 2020 (edited) Try this - quickly written. Note - When you select boundaries, the entire boundary must be visible on screen. It loops until you just hit Enter to exit the program. (defun c:BOFFSET (/ bp en od) ; Set offset distance (setq od 0.25) ; if Internal point is selected. (while (setq bp (getpoint "\nSelect Internal Point or <Enter> to exit: ")) (progn ; Create Boundary (command "._-Boundary" "_non" bp "") ; Get new polyline created (setq en (entlast)) ; Offset in toward internal point (command "._offset" od en bp "_non" "") (entdel en) ) ; end progn ) ; End If (princ) ) ; End defun Edited November 17, 2020 by pkenewell Quote Link to comment Share on other sites More sharing options...
amb2301 Posted November 17, 2020 Author Share Posted November 17, 2020 Hi pkenewell, Thank you so much for looking on this thread, i tried with the above code, but its not happening for me, could you please elaborate the working steps? i manually selected (as shown in screenshot) all the lines which need to offset & kept boundary visible in screen, but i m unable to do that. Quote Link to comment Share on other sites More sharing options...
pkenewell Posted November 17, 2020 Share Posted November 17, 2020 (edited) @amb2301 You cannot select all the boundaries at once, you just have to select an internal point for each boundary like the HATCH command, then just keep picking internal points until you have all the boundaries. As I said it will loop until you exit by pressing Enter. NOTE: I don't know of a way to do exactly what you want. There is no way to determine what the inside is for each boundary is by just selecting everything at once. Edited November 17, 2020 by pkenewell Quote Link to comment Share on other sites More sharing options...
amb2301 Posted November 17, 2020 Author Share Posted November 17, 2020 (edited) @pkenewell i tried selection of boundary like Hatch, but i m getting boundaries inside each lots as shown in below pic, i need to make boundary as shown in blue tic mark, could you please try with that sample file. sorry for troubling you Edited November 17, 2020 by amb2301 Quote Link to comment Share on other sites More sharing options...
pkenewell Posted November 17, 2020 Share Posted November 17, 2020 (edited) @amb2301 OK - sorry I misunderstood what you wanted. Try this. NOTE: you have to pick an Internal point, then select the OUTER boundary objects of the area. Before you press Enter after selecting the outer objects, make sure you zoom out so all objects for the selected boundary are visible on the screen. This is the best I can do i'm afraid. Perhaps someone else here can come up with something better. (defun c:BOFFSET (/ bp en od ss) ; Set offset distance (setq od 0.25) ; if Internal point is selected. (while (and (setq bp (getpoint "\nSelect Internal Point or <Enter> to exit: ")) (princ "\nSelect Boundary Objects: ") (setq ss (ssget)) ) (progn ; Create Boundary (command "._-Boundary" "_A" "_B" "_N" ss "" "" "_non" bp "") ; Get new polyline created (setq en (entlast)) ; Offset in toward internal point (command "._offset" od en bp "_non" "") (entdel en) ) ; end progn ) ; End If (princ) ) ; End defun Edited November 17, 2020 by pkenewell Quote Link to comment Share on other sites More sharing options...
amb2301 Posted November 17, 2020 Author Share Posted November 17, 2020 @pkenewell it was a great help to me, Thank you so much for your Help, within a quick time, you finished it, it really great man, Thank you so much for being the reason i smile today Quote Link to comment Share on other sites More sharing options...
amb2301 Posted November 17, 2020 Author Share Posted November 17, 2020 11 minutes ago, pkenewell said: @amb2301 OK - sorry I misunderstood what you wanted. Try this. NOTE: you have to pick an Internal point, then select the OUTER boundary objects of the area. Before you press Enter after selecting the outer objects, make sure you zoom out so all objects for the selected boundary are visible on the screen. This is the best I can do i'm afraid. Perhaps someone else here can come up with something better. (defun c:BOFFSET (/ bp en od ss) ; Set offset distance (setq od 0.25) ; if Internal point is selected. (while (and (setq bp (getpoint "\nSelect Internal Point or <Enter> to exit: ")) (princ "\nSelect Boundary Objects: ") (setq ss (ssget)) ) (progn ; Create Boundary (command "._-Boundary" "_A" "_B" "_N" ss "" "" "_non" bp "") ; Get new polyline created (setq en (entlast)) ; Offset in toward internal point (command "._offset" od en bp "_non" "") (entdel en) ) ; end progn ) ; End If (princ) ) ; End defun one final ask brother, is it possible to make the layer of offset line to "Proposed Boundary" layer in the same code. Quote Link to comment Share on other sites More sharing options...
pkenewell Posted November 17, 2020 Share Posted November 17, 2020 9 minutes ago, amb2301 said: one final ask brother, is it possible to make the layer of offset line to "Proposed Boundary" layer in the same code. This should work for you. (defun c:BOFFSET (/ bp en lyr od ol ss) ; Set offset distance (setq od 0.25 lyr "Proposed Boundary" ol (getvar "clayer") ) (if (not (tblsearch "layer" lyr)) (command "._-layer" "_m" lyr "_s" lyr "") (setvar "clayer" lyr) ) ; if Internal point is selected. (while (and (setq bp (getpoint "\nSelect Internal Point or <Enter> to exit: ")) (princ "\nSelect Boundary Objects: ") (setq ss (ssget)) ) (progn ; Create Boundary (command "._-Boundary" "_A" "_B" "_N" ss "" "" "_non" bp "") ; Get new polyline created (setq en (entlast)) ; Offset in toward internal point (command "._offset" od en bp "_non" "") (entdel en) ) ; end progn ) ; End If (setvar "clayer" ol) (princ) ) ; End defun Quote Link to comment Share on other sites More sharing options...
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.