notister Posted February 22, 2011 Posted February 22, 2011 Hi, I have a table with three columns: X, Y, LINK I'd like to populate a point layer from this table with points located at X and Y coordinates and the hyperlink automatically filled from LINK column (this is a path to a external file different for any point). Table is in MSaccess but I can convert it in other formats or ascii text file. is that possible maybe with scripts or other tools? thank you very much in advance Mario Quote
Organic Posted February 22, 2011 Posted February 22, 2011 You can automatically import points with coordinates into Civil 3D. There is no way to natively do it in vanilla AutoCad as far as I am aware although there is probably a lisp script available to accomplish it. Quote
rkmcswain Posted February 23, 2011 Posted February 23, 2011 Hi,I have a table with three columns: X, Y, LINK I'd like to populate a point layer from this table with points located at X and Y coordinates and the hyperlink automatically filled from LINK column (this is a path to a external file different for any point). Table is in MSaccess but I can convert it in other formats or ascii text file. is that possible maybe with scripts or other tools? thank you very much in advance Mario In a rudimentary way, this will work.... The opening "lst" variable is just a sample of data. You'll have to get some more code to read the CSV data and convert to a lisp lists (there should be plenty of examples out there, probably even here) - or I suppose you may even be able to get your data in the format below with some fancy word processor/excel automation...? Anyway....the (foreach) is the guts that creates the points and adds the hyperlink. If you have thousands or tens of thousands or more, then it would make sense to rewrite this with more efficient code -- this is just a quickie... Tested in an empty, clean drawing, v2011. (setq lst (list (list 1.0 1.0 "http://www.google.com") (list 5.0 6.0 "http://www.cadtutor.net") (list 3.5 4.2 "http://www.yahoo.com") ) ) (foreach k lst (setq x (nth 0 k) y (nth 1 k) h (nth 2 k) ) (vl-cmdf "._point" (list x y 0.0)) (command "._-hyperlink" "_I" "_O" "_L" "" h "" "") ) Quote
notister Posted February 23, 2011 Author Posted February 23, 2011 rkmcswain, this is what I was looking for. I've thousands of points but I can write a little routine that converts database records in lisp list. thank you very much Mario 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.