Results 1 to 5 of 5

Thread: How to find Hidden line from rectangle

  1. #1
    100 Club
    Join Date
    2011-08
    Location
    Vadodara, India
    Posts
    147
    Login to Give a bone
    0

    Default How to find Hidden line from rectangle

    Hi!

    I have a rectangle which have nos. of center line and 1(One) Hidden Line. How to find that hidden line because there is so many line types exist in AutoCAD. if found that hidden line I want to get coordinate of this Hidden line.

    How to do any help.

    Thanks,

    Avinash

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: How to find Hidden line from rectangle

    Do you know anything about using SSGET "CP" or ssget "WP" and additional filters.

    Code:
    (setq ss (ssget "WP" co-ords '((0 . "LINE")(6 . "Hidden"))))
    Post a sample dwg.

  3. #3
    100 Club
    Join Date
    2011-08
    Location
    Vadodara, India
    Posts
    147
    Login to Give a bone
    0

    Default Re: How to find Hidden line from rectangle

    Hi!

    Yes, I know the ssget fileter, But my situation is different here, Please see my attached drawing. There is so many type of linetype to generate in AutoCAD. some one use HIDDEN, HIDDEN2, HIDDENX2 , DASHED, DASHED2 , ACAD_ISO02W100 OR ACAD_ISO03W100.

    It is not saying perticular linetype using but all types are use as a hidden line. how to we decide this is a hidden/dashed line.

    Thanks,

    Avinash
    Attached Files Attached Files

  4. #4
    I could stop if I wanted to
    Join Date
    2002-08
    Posts
    231
    Login to Give a bone
    0

    Default Re: How to find Hidden line from rectangle

    A start with this ?
    Code:
    (defun c:MY_LIST ( / ss ent l_pt n dxf_ent)
      (graphscr)
      (while (null (setq ss (ssget "_+.:E:S" '((0 . "LWPOLYLINE") (67 . 0) (90 . 4))))))
      (setq
        ent (ssname ss 0)
        l_pt (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget ent)))
        l_pt (mapcar '(lambda (z) (trans z 0 1)) l_pt)
      )
      (setq ss (ssget "_CP" l_pt '((0 . "LINE"))))
      (cond
        (ss
          (repeat (setq n (sslength ss))
            (setq dxf_ent (entget (ssname ss (setq n (1- n)))))
            (print (cdr (assoc 0 dxf_ent)))
            (princ (strcat "\t on layer " (cdr (assoc 8 dxf_ent))))
            (princ (strcat "\t at coord X = " (rtos (cadr (assoc 10 dxf_ent))) " Y = " (rtos (caddr (assoc 10 dxf_ent)))))
            (princ (strcat "\t to coord X = " (rtos (cadr (assoc 11 dxf_ent))) " Y = " (rtos (caddr (assoc 11 dxf_ent)))))
            (textscr)
            (if (null (assoc 6 dxf_ent))
              (princ (strcat "\t With linetype : " (cdr (assoc 6 (tblsearch "LAYER" (cdr (assoc 8 dxf_ent)))))))
              (princ (strcat "\t With linetype : " (cdr (assoc 6 dxf_ent))))
            )
            (print)
          )
        )
      )
      (prin1)
    )

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: How to find Hidden line from rectangle

    From your posted drawing modifying BIG-AL's code to:
    Code:
    (setq ss (ssget "WP" co-ords '((0 . "LINE")(8 . "H"))))
    should do the trick as they're all on the same layer.

    Without a specific list of linetypes how else could they be found? As most use ByLayer properties like your centerlines are drawn not sure how else to do this.

Similar Threads

  1. Replies: 2
    Last Post: 2012-07-13, 09:04 PM
  2. Replies: 3
    Last Post: 2011-01-31, 04:15 AM
  3. Replies: 3
    Last Post: 2009-04-15, 07:30 PM
  4. Find the lower left corner of polyline rectangle
    By avinash00002002 in forum AutoLISP
    Replies: 5
    Last Post: 2007-04-28, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •