Does anybody know of a way to automatically enter points in LT? This could come from an Excel table that has x,y,z coordinates and maybe another field for a label (such as with a block attribute entry). I know that a product named Geotools can do this for regular Autocad and other products but it does not run on LT the last time I checked.
Solved! Go to Solution.
Solved by john.vellek. Go to Solution.
Use a SCRIPT file. Rewrite your spreadsheet to include commands for a script, then export it as a space delimited format file. Rename as a script (SCR extension). To run the insert command at the command line use -insert. Turn off the attribute dialog first. For example, if your first coordinate set was 5,5,5 and your attribute "Test" :
attdia
0
-insert
BLOCKNAME
5,5,5
1 (X scale factor)
1 (Y scale factor)
0 (rotation)
Test
The italicized content are EXCEL columns you can easily add in front of each coordinate set in the spreadsheet and auto-copy down.
Warren Geissler
Drafting Manager Denver Water
_____________________________________________
Please ACCEPT AS SOLUTON if this works
(...and doesn't melt your computer or cause Armageddon)
Hi @Anonymous,
You are correct that add-ins will not work in AutoCAD LT.
@WarrenGeissler provides a great means to get started. If you have each of the values in separate columns, use the CONCATENATE function of Excel to build your script and to combine the cells.
If you can provide some sample data and the point block you normally use I am happy to get you started.
Please select the Accept as Solution button if my post solves your issue or answers your question.
Thank you for helping with this.
I have attached a sampling of a typical file and a block that would be used in conjunction with the coordinates. The attribute is the first column followed by the x,y,z coordinates (PENZ as in point, easting, northing, elevation).
I have used Geotools in other versions of Autocad (Map, Civil, Autocad) but have never used an .scr file, especially in LT which I have been using for about 6 months. I have also created and run LISP but not specifically for this purpose.
Hi @barry.wheeler,
I put together a video that shows my process to import the points. You will see that in the XLS file you gave me, I use the concatenate function to add the -INSERT command followed by the block name and the point location and lastly the point name. Once this is complete, I simply copy the data into a text file and name it with a SCR file extension. I can then return to AutoCAD LT and use SCRIPT to ruin the file. I also set CMDDIA=1 and return it to 1 when complete. This suppresses command dialogs.
I have attached my files for your use.
Please select the Accept as Solution button if my post solves your issue or answers your question.
I don't like to beat a dead horse but I played around with the Excel sheet to try to get a second line of attribute text inserted in the script. I tried putting a space (thus a return) and a space in quotes but in both cases got unexpected and unwanted results. How do I end the script and exit the diesel dialogue box that comes up when doing the insertion manually?
This routine, if it works, can answer another question on a different forum which is how to create 'Halo text" for a symbol and its attributes.
It's a shame John no longer works at Autodesk, I can see one problem with this script and I have no idea how he got it to work. Normally when a script starts a command that expects a text input it will read anything else remaining on that line of the script as the complete text so in the example John gave the script will try to find a block named
"Borehole 571758.289,6064469.893,1182.055 0 A-SS18-01".
In any scripts I run you have to use a line feed directly after any text input so
"-insert Borehole 571758.289,6064469.893,1182.055 0 A-SS18-01"
has to be written on 2 lines
"-insert Borehole"
"571758.289,6064469.893,1182.055 0 A-SS18-01"
So this would work, the value for the attribute is also text but being at the end of the line this is fine, when you have a second attribute that would need to be entered on a newline (but take care that there are no extra spaces at the end of the lines, in a script when text is expected then a space is just a space)
Thank you for your response.
The script has worked for quite some time using a single text attribute. I am no expert on writing scripts.
I realized after that I did not provide all information. The second attribute in my specific application is to be the same as the first. This will create an appearance shown in my attachment (with both attributes coincidental). I tried repeating the Excel cell at the end of the line but it did not work.
Should this go to the Autocad customization forum?
Can't find what you're looking for? Ask the community or share your knowledge.