+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Aug 2015
    Posts
    9

    Default Need help with modifying pointsin.lsp by Tom Haws

    Registered forum members do not see this ad.

    Hi,
    I'd like to modify this lisp to insert survey points as block showing only point number (2D or 3D, doesn't matter), and I'm having trouble figuring it out. Point file is in format:
    "Point number","East","North","Elevation"
    I'm attaching ex. files.
    I'd be thankful for any help.
    Attached Files

  2. #2
    Senior Member
    Computer Details
    ronjonp's Computer Details
    Operating System:
    Windows 10
    Using
    AutoCAD 2018
    Join Date
    Apr 2009
    Location
    Colorado
    Posts
    457

    Default

    Not a code solution, but if you filter your blockname and select all, you can then blank out the 'ELEV' & 'DESC' attributes in one fell swoop using the properties palette.

  3. #3
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Aug 2015
    Posts
    9

    Default

    I can't get it to work at all. I'm not very experienced in lisp, so that might be the problem.. The indtructions on modifying are in the comments, but everything I tried so far didn't seem to work.. :/

  4. #4
    Senior Member
    Computer Details
    ronjonp's Computer Details
    Operating System:
    Windows 10
    Using
    AutoCAD 2018
    Join Date
    Apr 2009
    Location
    Colorado
    Posts
    457

    Default

    Swap out this function within the code and it will only fill in the POINT attribute.
    Code:
    (defun
       pi:insertpointblock
       (pointlist pointformat pointblocklayerformat / at av el en et n newvalue shortlist)
      (pi:makelayer pointblocklayerformat pointlist pointformat)
      (command
        "._insert"
        "point"
        "_none"
        ;; Chop off the z coordinate for 2D block insertion.
        (reverse (cdr (reverse (car pointlist))))
        ;; Or keep the z coordinate for 3D block insertion.
        ;;(CAR POINTLIST)
        (* (getvar "dimscale") (getvar "dimtxt"))
        ""
        0
      )
      (setq en (entlast))
      ;;Fill in attributes
      (while (and
               (setq en (entnext en))
               (/= "SEQEND" (setq et (cdr (assoc 0 (setq el (entget en)))))) ;_ end of /=
             ) ;_ end of and
        (cond
          ((and (= et "ATTRIB") (wcmatch (setq at (cdr (assoc 2 el))) "POINT"))
           (setq av (cdr (assoc 1 el))) ;_ end of setq
           (cond
             ((setq shortlist (member at (reverse (cdr (assoc "TAGNAMES" pointformat)))))
              (setq
                n        (length shortlist)
                newvalue (nth n pointlist)
              )
              ;; Round elevation attribute to current drawing LUPREC value
              ;;(IF
              ;;  (= AT "ELEV")
              ;;  (SETQ NEWVALUE (RTOS (ATOF NEWVALUE) 2))
              ;;)
              (entmod
                (subst (cons 1 newvalue) (assoc 1 el) el) ;_ end of SUBST
              ) ;_ end of ENTMOD
             )
           ) ;_ end of cond
           (entupd en)
          )
        ) ;_ end of cond
      ) ;_ end of while
    )

  5. #5
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Aug 2015
    Posts
    9

    Default

    I get this error:
    "Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Option to put all point blocks on same layer is active. Search this text in the source code to change behavior.
    Value must be nonzero."
    I'm attaching the original .zip of the lisp program. Can you make it work at all?
    This is frustrating...
    Attached Files

  6. #6
    Senior Member
    Computer Details
    ronjonp's Computer Details
    Operating System:
    Windows 10
    Using
    AutoCAD 2018
    Join Date
    Apr 2009
    Location
    Colorado
    Posts
    457

    Default

    Quote Originally Posted by shercer View Post
    I get this error:
    "Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Fields or delimiters missing in this line?AC1015
    Option to put all point blocks on same layer is active. Search this text in the source code to change behavior.
    Value must be nonzero."
    I'm attaching the original .zip of the lisp program. Can you make it work at all?
    This is frustrating...
    Doesn't MAP have this functionality built in?

  7. #7
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Aug 2015
    Posts
    9

    Default

    I'm not sure about that, it'd be great if there was any other way.. I will look it up for sure..

  8. #8
    Senior Member
    Computer Details
    ronjonp's Computer Details
    Operating System:
    Windows 10
    Using
    AutoCAD 2018
    Join Date
    Apr 2009
    Location
    Colorado
    Posts
    457

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by shercer View Post
    I'm not sure about that, it'd be great if there was any other way.. I will look it up for sure..
    I have C3D 2017 and import points is the command: _Aeccimportpoints

Similar Threads

  1. need help modifying a lisp
    By GlnGrnr in forum AutoLISP, Visual LISP & DCL
    Replies: 17
    Last Post: 31st May 2013, 01:15 pm
  2. Text is not modifying
    By MeOH in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 1
    Last Post: 9th Jul 2010, 06:04 pm
  3. Modifying a Box
    By polyhedron in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 29th Jun 2004, 06:44 am
  4. modifying walls
    By Patty P in forum AutoCAD Drawing Management & Output
    Replies: 5
    Last Post: 15th May 2003, 11:00 am

Tags for this Thread

Bookmarks

Posting Permissions

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