Results 1 to 4 of 4

Thread: Help Developing LISP

  1. #1
    Member
    Join Date
    2016-03
    Posts
    4
    Login to Give a bone
    0

    Default Help Developing LISP

    Im trying to write a new lisp routine however it is not performing correctly. I must be missing something. The code looks like this:

    Code:
    (defun C:HG()
    (command"bedit")
    (command"selectsimilar"(ssget))
    (command"erase")
    (command"hatchgenerateboundary"(ssget))
    (princ)
    )
    It should be simply but it keeps hung up on the first (ssget) and doesn't go any further. I want to be able to perfrom a user select then hit enter to continue with the erase command. Any advice would be helpful.
    Last edited by rkmcswain; 2018-06-14 at 03:39 PM. Reason: added [CODE] tags

  2. #2
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    0

    Default Re: Help Developing LISP

    Quote Originally Posted by winks77706723111 View Post
    Im trying to write a new lisp routine however it is not performing correctly. I must be missing something. The code looks like this:

    (defun C:HG()
    (command"bedit")
    (command"selectsimilar"(ssget))
    (command"erase")
    (command"hatchgenerateboundary"(ssget))
    (princ)
    )

    It should be simply but it keeps hung up on the first (ssget) and doesn't go any further. I want to be able to perfrom a user select then hit enter to continue with the erase command. Any advice would be helpful.
    Can you describe what you are trying to do and attach a sample drawing? (Use go advanced button to attach files)

    P=
    AutomateCAD

  3. #3
    Member
    Join Date
    2016-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Help Developing LISP

    Peter,

    I will try my best to explain. Our company has a huge library of markup blocks we have to edit. The process I am using to edit goes like this. I click on the block to go into block editor, then select only the lines or polyline (whichever it has) around the outside border of the block and deleting the lines. Then next I want to select the hatch and generate an new hatch border that is a polyline. You may be asking now why am I deleting the polyline and then creating an new one. This is because whoever made the blocks before me did not keep it consistent. Some are polylines and some are just multiple lines. The goal is to have all polylines so no matter which one it is I need the code the delete then generate so there is only the need for one lisp code. I've attached a sample of one of the markups.

    - - - Updated - - -

    On second thought use this file.

    - - - Updated - - -

    Use the one that is 34kb
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    2016-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Help Developing LISP

    see my above response.

Similar Threads

  1. developing Tool Palettes
    By GOchrisgilmer in forum AutoCAD Customization
    Replies: 6
    Last Post: 2016-05-09, 05:09 PM
  2. Developing in .NET for AutoCAD
    By ettore_c in forum Dot Net API
    Replies: 5
    Last Post: 2015-01-30, 03:50 PM
  3. VBA or C# for developing Inventor plugin?
    By gold_ionut778295 in forum Inventor - General
    Replies: 3
    Last Post: 2012-10-11, 05:40 PM
  4. Developing an API
    By thiagosds924111 in forum NavisWorks - General
    Replies: 1
    Last Post: 2011-11-16, 03:16 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
  •