CJEngineering Posted April 15, 2019 Share Posted April 15, 2019 Hi, I'm new here and I'm looking to make a macro that will allow me to export co-ordinates from autocad into an excel sheet similarly to Click 2 XLS but make it leave a mark and number as reference to the where I have clicked. Is this sort of thing even possible? If so where would you suggest that I start with finding a way to do this? Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted April 15, 2019 Share Posted April 15, 2019 Export everything (every line, ...) ? just blocks (if yes, read attributes ? ) ? ... can you give a small example of end result that you want, both the excel & dwg ? That mark, is that a block with an attribute? or a point with text next to it ... ? Quote Link to comment Share on other sites More sharing options...
CJEngineering Posted April 15, 2019 Author Share Posted April 15, 2019 I've attached a PDF of an Autocad drawing showing the result that I'm looking for and a CSV file looking roughly like I want. What I've been doing to get the results without the macro is exporting Co-ordinates from autocad into excel using Click 2 XLS (link https://www.cadforum.cz/cadforum_en/click2xls-click-points-to-export-from-autocad-to-excel-tip8030) then putting the CSV file into my Leica controller and exporting it as DXF which is giving me point references etc. Macroexample.pdf 15.04HOOK3.csv Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 16, 2019 Share Posted April 16, 2019 What you want is set out point routine, bottom line is have a block with a single attribute, the point number, I have a couple. Pretty sure a better answer is on lee-Mac website he has a point number routine that renumbers when you remove a point. The routine I have checks for last point number so don’t have to do all in one go. You create points as one routine, then another makes the xyz file. It also has a point labeller drag the bubble. Its like 20 years old so in looking at PDF maybe should be made smarter by not only picking points but recognise objects like lines and plines. This does though have the overhead of checking for a point already on end. On IPad now will try to post something later. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 16, 2019 Share Posted April 16, 2019 (edited) These are very old but work. Use setoupt to insert points, use setout last ptno to find last point number, use setout file to create a csv file. The dwg has the two blocks you need. It is metric so happy to tweak to work with feet just need sample dwg to sort it out. It is on my wish list to make way better. Press enter to repeat and enter to accept next number. Will change to a while as soon as I can. There is also make a table of the csv file. If you post a dwg may be able to improve to pick object rather than point. just cut it down a bit and save with only the layers you want setout for and some other layers need to be able to turn on/off other layers to see any problems. SETOUT - File.LSP Setout Last Ptno.LSP new block.dwg SETOUTPT-2019.lsp Multi GETVALS.lsp Edited April 16, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
CJEngineering Posted April 16, 2019 Author Share Posted April 16, 2019 Thanks Bigal, I'm fairly basic when it comes to autocad as I only use it to set out eg Point ID and Measuregeom. How do i use these with Autocad? and have you got a screen shot of the outcome? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 16, 2019 Share Posted April 16, 2019 (edited) I have modified setout-2019 which checks a few more things. Also added multi getvals.lsp which is needed To run save all the files into a directory that is in your search path. Setout-2019.lsp You can drag and drop from explorer or use appload to load it. To repeat just type setoutpt. This is step one. it should mke points with numbers. The run setout - file to make the csv file. You need to open Newblock and copy the two blocks to your drawing template then delete, the block definition they will still be there. Future version will make the two blocks if it does not exist. Just ask questions if stuck. Edited April 16, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
CJEngineering Posted April 16, 2019 Author Share Posted April 16, 2019 When i get home I'll give this a go and let you know how it went, thank you very much. Quote Link to comment Share on other sites More sharing options...
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.