Results 1 to 3 of 3

Thread: Macro for polyline edit

  1. #1
    Member
    Join Date
    2008-12
    Posts
    7
    Login to Give a bone
    0

    Default Macro for polyline edit

    Howdy!

    Been awhile since I've been here. Had once a nice little macro for a polyline edit and now, I think it died on me.
    What I had was sweet, after selecting the line I wish to change, it not only answered the question "do you want to turn it into one...Y", but also activated the "join" command and all I had to do was select my additional lines.
    I dislike (for some anal reason) to hit that J for Join! It worked for years. Now, it's mad at me and is not working.

    I would very much appreciate if you could look at it and tell me what needs to change.

    Thanks.

    Here's what I had ..... ^C^C_pedit ;\JOIN;\
    I tried changing the word JOIN to just J, but it's still angry at me.

    Running Autocad 2012.

    Thanks again!
    Michael

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

    Default Re: Macro for polyline edit

    Since you posted in the Lisp forum this is what I use:
    Code:
     ;;; PLJOIN.LSP ;;; Joins lines, arcs and polylines
    ;;; If only one object is selected it joins to all conected objects
    ;;; If multiple objects are selected it joins to all conected objects.
    ;;; By Tom Beauford
    ;;; BeaufordT@LeonCountyFL.gov
    ;;; Macro   ^P(or C:pljoin (load "pljoin.lsp"));pljoin
    
    (defun c:pljoin (/ cmdecho peditaccept ss fuzzdst)
      (princ "\nSelect object to join: ")
      (setq cmdecho (getvar "cmdecho")
            peditaccept (getvar "peditaccept")
            ss (ssget '((0 . "LINE,ARC,*POLYLINE")))
    ;        fuzzdst (getdist "\nFuzz Distance: ")
      )
      (setvar "cmdecho" 0)
      (setvar "peditaccept" 1)
      (if ss
          (progn
    	(if (= (sslength ss) 1)
              (command "_.pedit" ss "_J" "_all" "" "")
    ;          (command "_.pedit" "_M" ss "" "_J" "_J" "_E" fuzzdst "")
              (command "_.pedit" "_M" ss "" "_J" "_J" "_E" "0.0" "")
    	)
          )
      )
      (setvar "cmdecho" cmdecho)
      (setvar "peditaccept" peditaccept)
      (princ)
    )
    Put pljoin.lsp in a support folder.
    Put the macro
    Code:
    ^P(or C:pljoin (load "pljoin.lsp"));pljoin
    in the "Context menu for edit mode" Shortcut Menu.

    Now right-click lines, arcs, and polylines and if only one object is selected it joins to all conected objects. If multiple objects are selected it joins just those objects.

  3. #3
    Member
    Join Date
    2008-12
    Posts
    7
    Login to Give a bone
    0

    Default Re: Macro for polyline edit

    Thank you for such a fast response. Your suggestion worked well.

    I posted here because I couldn't figure out where else to post my question. Like I said, been awhile since I've been here.

    Again, thank you for your response. Your suggestion worked!

Similar Threads

  1. Macro to edit text
    By SwizzleStick in forum AutoCAD Customization
    Replies: 3
    Last Post: 2015-07-31, 07:59 PM
  2. Edit text in place with macro
    By kole_bg907874 in forum AutoLISP
    Replies: 3
    Last Post: 2012-01-12, 12:39 PM
  3. polyline length macro
    By brett.warren in forum AutoCAD LT - General
    Replies: 0
    Last Post: 2010-02-18, 03:46 PM
  4. Polyline Edit
    By birdcube in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2008-10-02, 03:16 PM
  5. Create a macro to draw Polyline a certain width
    By Bear31831 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2007-01-31, 05:47 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
  •