Dayananda Posted January 28, 2021 Posted January 28, 2021 I have excel sheet containing point number and coordinates of points. How can i plot the point and wright reverent point number with it converting to cvs file I can plot theCombaind Points.csv points.But cannot write the point number. Quote
pBe Posted January 28, 2021 Posted January 28, 2021 (defun c:demo ( / _DelTolst opf source a data) (setvar 'pdsize 0.05) (defun _DelTolst ( str m / pos x lst lst2) (if (setq pos (vl-string-position m str)) (cons (substr str 1 pos) (_DelTolst (substr str (+ pos 2)) m )) (list str) ) ) (if (setq source (getfiled "Select csv file" (getvar "dwgprefix") "csv" 16)) (progn (setq opf (open source "r")) (while (setq a (read-line opf)) (setq data (_DelTolst a 44)) (entmake (list (cons 0 "POINT")(setq lay (cons 8 (Cadddr (Cdr data)))) (cons 10 (setq p (mapcar '(lambda (n) (distof (nth n data))) '(1 2 3)))) ) ) (entmakex (list (cons 0 "TEXT") (cons 10 p) (cons 11 p)lay '(40 . 0.1)'(72 . 1)'(73 . 1) (cons 1 (car data)))) ) (close opf) ) )(princ) ) Quote
eldon Posted January 28, 2021 Posted January 28, 2021 When you want to plot text from a csv file, you must supply all the different information that text needs to be plotted. So beginning with the TEXT command, you need to specify the Text Style, Justification, the position of the text, size of text, rotation of text, and the actual text. All could be done in a spread sheet but easier with a lisp. If you are going to use this plot to draw up a survey, I would caution against using the AutoCAD point to mark the position, because the line-weight of points cannot be increased from their default value of 0. Quote
BIGAL Posted January 28, 2021 Posted January 28, 2021 Using excel to do this is not that hard to do this avoiding using a macro etc. In excel is the command concatenate so its easy to make a POINT X,Y column, which you just copy and paste to command line same with text =Concatenate("Point ", A1,",",B1) this is col A is X col B is y = Point x,y Just do the same another column for text you preset style but it uses the same A1,B1 etc, depending on text style you will need or not the height. 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.