Jump to content

Run overkill command or similar on current layer only


david1-b

Recommended Posts

Hello,

 

I have been working on a VLISP routine that reads from a txt file and draws some plines based on the text file. As a result of how the text files are received some lines are drawn as duplicates. Accordingly, I would like to run the overkill command or something similar at the end of the routine on only the active layer.

 

Can anyone provide advice or code snippets as to how I can complete this. I did not see an ActiveX reference to OVERKILL, and am pretty new to vlisp (so go easy).

 

Thanks

David

Link to comment
Share on other sites

After a little digging around in the OVERKILL.lsp file, try this:

 

(defun _overkillLayer (layer / ss)
 (if (and (or acet-overkill2 (load "overkillsup.lsp" nil))
          (setq ss (ssget "_X" (list (cons 8 layer))))
     )
   ;; over-kill - delete overlaping and un-needed entities
   ;; Takes single list of arguments:
   ;;  ss           - selection set
   ;;  fuz          - for numeric comparisons
   ;;  ignore       - (optional) list of group codes specifying which common group codes to ignore 
   ;;                 when comparing entities.
   ;;  no-plines    - (optional) flag - T means do NOT optimize segments within plines.
   ;;  no-partial   - (optional) flag - T means do NOT combine parallel segments that partially overlap
   ;;  no-endtoend  - (optional) flag - T means do NOT combine parallel segments that are end to end.
   (acet-overkill2 (list ss 0.000001 nil nil nil nil))
 )
)

 

eg.

(_overkillLayer (getvar 'CLAYER))

Link to comment
Share on other sites

Thank you very much,

First I will apologize if I have already replied but I am confused by "quick reply", "reply to thread", and "reply". It took me awhile to get back to this as we have had some flooding. The addition of overkill works exactly as expected. It is slow but this is actually a little quicker then running overkill from the GUI as it is only working on the current layer.

 

Thanks

Link to comment
Share on other sites

Thank you very much,

First I will apologize if I have already replied but I am confused by "quick reply", "reply to thread", and "reply". It took me awhile to get back to this as we have had some flooding. The addition of overkill works exactly as expected. It is slow but this is actually a little quicker then running overkill from the GUI as it is only working on the current layer.

 

Thanks

 

I had completely forgotten about this thread. Glad it works. The speed will be determined by the amount of objects on provided layer. I didn't write anything new, except for a function that utilizes the main engine of Overkill and applies it to a selection set of the provided layer.

Link to comment
Share on other sites

  • 5 years later...

Hello, how do I use this command? What does it exactly do?

 

I'm trying to overkill some lines, but I want the top layer to not get any lines removed, I want it to be a priority over the duplicate lines underneath. How do I do it?

Thanks

Link to comment
Share on other sites

  • 11 months later...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...