Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: LISP routine not working correctly on all DWG files

  1. #1
    Active Member
    Join Date
    2006-10
    Posts
    80
    Login to Give a bone
    0

    Default LISP routine not working correctly on all DWG files

    I've problem on this routine. When I run my code (tagger1.lsp) on the drawing (tagger.dwg) it cannot work perfectly. But after I've deleted a few line like in the drawing (tagger1.dwg) it can work well. How to make it work properly on the drawing (tagger.dwg)? Please help me solve this problem. Thanks.
    Attached Files Attached Files
    Last edited by noadea; 2007-01-23 at 11:20 AM. Reason: wrong spelling

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

    Default Re: LISP routine not working correctly on all DWG files

    What's it supposed to do?
    What is it doing in tagger1.dwg that it isn't in tagger.dwg?

  3. #3
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Quote Originally Posted by rohaya.shaffini
    I've problem on this routine. When I run my code (tagger1.lsp) on the drawing (tagger.dwg) it cannot work perfectly. But after I've deleted a few line like in the drawing (tagger1.dwg) it can work well. How to make it work properly on the drawing (tagger.dwg)? Please help me solve this problem. Thanks.
    Your lisp routine is supposed to work with polylines (lwpolylines). In tagger.dwg, all of them are lines. I pedited them to polylines and it works fine. The problem with the deleted lines seems to be an additional vertex (a small segment), which was not getting joined.

    Regards,

    Abdul Huck

  4. #4
    Active Member
    Join Date
    2006-10
    Posts
    80
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Abdul Huck,
    How the lisp routine that can convert lines to polylines look like?
    Please help me solve this problem. Thanks.

  5. #5
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Quote Originally Posted by rohaya.shaffini
    Abdul Huck,
    How the lisp routine that can convert lines to polylines look like?
    Please help me solve this problem. Thanks.
    The built-in command in AutoCAD is PEDIT, then use the Join option. If you have Express tools installed, you can use MPEDIT, which will convert and joins all lines globally.

    Regards,
    Abdul Huck

  6. #6
    Active Member
    Join Date
    2006-10
    Posts
    80
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    which part i need to add the pedit or mpedit command in my lisp (tagger1.lsp)?

  7. #7
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Hi rohaya,
    test this code
    Code:
    (defun c:test (/ ss sse otyp sp ep)
      (if
        (setq ss (car (entsel "\nSelect an object line")))
        (progn
          (setq sse (entget ss))
          (setq otyp (cdr (assoc 0 sse)))
          (if
    	(= otyp "LINE")
    	(progn
    	  (setq sp (cdr (assoc 10 sse)))
    	  (setq ep (cdr (assoc 11 sse)))
    	  (command "_pline" sp ep "")
    	  (command "_erase" ss "")
    	  )         ; progn
    	)           ; if
          )             ; progn
        (alert "\nThere is not object,try again")
        )               ; if
      (princ)
      )                 ; defun
    Quote Originally Posted by rohaya.shaffini
    Abdul Huck,
    How the lisp routine that can convert lines to polylines look like?
    Please help me solve this problem. Thanks.

  8. #8
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Quote Originally Posted by rohaya.shaffini
    which part i need to add the pedit or mpedit command in my lisp (tagger1.lsp)?
    Rohaya,

    You don't need to. Open your drawing, run MPEDIT command and convert all lines to polylines, then run your lisp.

    Regards,

    Abdul Huck

  9. #9
    Active Member
    Join Date
    2006-10
    Posts
    80
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    I've tried already but it can't work properly. I've attached the drawing after I converted them to polylines then I run my lisp. Hope you guys can help me. I want it be each circle on each tip. Thanks.
    Attached Files Attached Files

  10. #10
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: LISP routine not working correctly on all DWG files

    Quote Originally Posted by rohaya.shaffini
    I want it be each circle on each tip. Thanks.
    Sorry, I'm not very clear about the concept of this drawing, nor do I know the values to input. Could you please explain a bit more? A snapshot of your final dwg will give a better idea.

    Regards,

    Abdul Huck

Page 1 of 2 12 LastLast

Similar Threads

  1. Lisp routine not working anymore in ACAD2010 Mech
    By jim.dozorec in forum AutoLISP
    Replies: 2
    Last Post: 2012-07-20, 01:14 PM
  2. Lisp routine stopped working in Autocad 2008
    By kberry in forum AutoLISP
    Replies: 2
    Last Post: 2007-07-13, 05:53 PM
  3. Replies: 6
    Last Post: 2007-03-11, 08:05 AM
  4. Replies: 11
    Last Post: 2006-08-03, 11:52 AM
  5. Lisp not working correctly
    By BCrouse in forum AutoLISP
    Replies: 4
    Last Post: 2005-04-22, 09:27 PM

Posting Permissions

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