shercer Posted July 18, 2017 Posted July 18, 2017 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 Quote
ronjonp Posted July 18, 2017 Posted July 18, 2017 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. Quote
shercer Posted July 18, 2017 Author Posted July 18, 2017 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.. :/ Quote
ronjonp Posted July 18, 2017 Posted July 18, 2017 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 ) Quote
shercer Posted July 18, 2017 Author Posted July 18, 2017 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 Quote
ronjonp Posted July 18, 2017 Posted July 18, 2017 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? Quote
shercer Posted July 18, 2017 Author Posted July 18, 2017 I'm not sure about that, it'd be great if there was any other way.. I will look it up for sure.. Quote
ronjonp Posted July 18, 2017 Posted July 18, 2017 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 Quote
Recommended Posts
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.