Jump to content
david1-b

Run overkill command or similar on current layer only

Recommended Posts

david1-b

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

Share this post


Link to post
Share on other sites
alanjt

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))

Share this post


Link to post
Share on other sites
david1-b

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

Share this post


Link to post
Share on other sites
alanjt
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.

Share this post


Link to post
Share on other sites
loispl

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

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...