Jump to content

Need help with modifying pointsin.lsp by Tom Haws


shercer

Recommended Posts

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. :)

Points.txt

pointsin.lsp

point.dwg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.. :/

Link to comment
Share on other sites

Swap out this function within the code and it will only fill in the POINT attribute.

(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
     ([color="red"](and (= et "ATTRIB") (wcmatch (setq at (cdr (assoc 2 el))) "POINT")[/color])
      (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
)

Link to comment
Share on other sites

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...

pointsin-v1.0.15.zip

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...