Author Topic: how to identify a line has a duplicate???  (Read 4012 times)

0 Members and 1 Guest are viewing this topic.

rainier

  • Guest
how to identify a line has a duplicate???
« on: July 09, 2007, 11:15:45 PM »
guys!
question:
how to identify a single line not duplicate.. and not lays in the same line...

       start point1  X----------X----------X---------------X  end point1
                                start point2   start point2

how to make in lisp routine...??

Adesu

  • Guest
Re: how to identify a line has a duplicate???
« Reply #1 on: July 10, 2007, 01:28:34 AM »
Hi rainier,
look like this
Code: [Select]
(defun c:test (/ ss ssl)
  (if
    (setq ss (ssget '((0 . "LINE"))))
    (progn
      (setq ssl (sslength ss))
      (if
(>= ssl 2)
(alert (strcat "\nThis object have"
       "\n"
       "\n" (itoa ssl) " lines"))
) ; if
      )   ; progn
    (alert "\nThis object not line")
    )     ; if
  (princ)
  )       ; defun  

guys!
question:
how to identify a single line not duplicate.. and not lays in the same line...

       start point1  X----------X----------X---------------X  end point1
                                start point2   start point2

how to make in lisp routine...??

rainier

  • Guest
Re: how to identify a line has a duplicate???
« Reply #2 on: July 10, 2007, 01:50:51 AM »
its close...

do u know the command overkill in autocad command... but a simplier one... i will add it to my routine...

Adesu

  • Guest
Re: how to identify a line has a duplicate???
« Reply #3 on: July 10, 2007, 02:06:16 AM »
Quote
how to make in lisp routine...??
are you want lisp program or Autocad build in command ?  :angel:

its close...

do u know the command overkill in autocad command... but a simplier one... i will add it to my routine...

rainier

  • Guest
Re: how to identify a line has a duplicate???
« Reply #4 on: July 10, 2007, 02:11:47 AM »
no, we make by our own code for find the duplicate lines or arcs...

Adesu

  • Guest
Re: how to identify a line has a duplicate???
« Reply #5 on: July 10, 2007, 02:24:04 AM »
Post here your code, in order to others member would correction.

no, we make by our own code for find the duplicate lines or arcs...

rainier

  • Guest
Re: how to identify a line has a duplicate???
« Reply #6 on: July 10, 2007, 02:28:22 AM »
i dont have the yet the code for finding the duplicate lines and arcs.. still finding one in the web..

hmspe

  • Bull Frog
  • Posts: 362
Re: how to identify a line has a duplicate???
« Reply #7 on: July 10, 2007, 11:00:58 AM »
i dont have the yet the code for finding the duplicate lines and arcs.. still finding one in the web..

If you want to write your own function you could use the same approach as what is used in OVERKILL that resolves overlapping lines.  See the acet-overkill-resolve-lines2 and acet-overkill-resolve-arcs2 functions in overkillsup.lsp. 

If you intend to only use the lisp code in your office I'd recommend using OVERKILL rather than writing a new routine.  OVERKILL isn't perfect, but it has been available for a long time and it works fairly well.  OVERKILL.LSP is just an interface.  All the code to do the cleanup is in OVERKILL.SUP.  It is easy to link directly to the functions in OVERKILLSUP.LSP.

Martin
"Science is the belief in the ignorance of experts." - Richard Feynman

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: how to identify a line has a duplicate???
« Reply #8 on: July 10, 2007, 11:06:55 AM »
guys!
question:
how to identify a single line not duplicate.. and not lays in the same line...

       start point1  X----------X----------X---------------X  end point1
                                start point2   start point2

how to make in lisp routine...??

math
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.