Jump to content

Needing help with a LISP file


Recommended Posts

I work for a utility company and we developed a system to export data from a database that contains information (UTM locations and identifier tag numbers) about utility poles on our system, then we converted that data into a .csv file and used a LISP file to import that data into AutoCAD where it would place a block in the correct position on a landbase map according to its UTM coordinates. We first started using this LISP file on AutoCAD Map 3D 2007 (also worked with standard AutoCAD 2007 as well) and continued to use it successfully for all versions up until 2017. When we recently updated our version to ACAD Map 3D 2017, I tried to run this LISP routine and I would immediately get an error and it would promptly abort the command. We tried this file on a few other computers in the office and got the same results. I was fortunate that I still had a version of 2014 on my PC so we could continue to move work along, but in the meantime we are losing productivity in processing these jobs and we are not proficient in LISP coding to troubleshoot the problem. I don't know if we are alone in having LISP files malfunction with the 2017 version of AutoCAD, but if anyone can give me some guidance on what may be causing the issue, I'd greatly appreciate it!

 

I have attached the file below, so take a look and see if there is any way to make this work again!

 

Thanks!

 

insblk2.lsp

Link to post
Share on other sites
  • 2 weeks later...
Murph_map

Can you provide a small sample of the CVS file you are using with this? Also the dcl file (insblk2.dcl) .

Link to post
Share on other sites

insblk2.dcl

 

Here are the .dcl and .csv files that we use. In the .csv, the columns are as follows:

A) Block reference (selects which block in the template file to place at the locations provided... you can alter this to choose a block you currently have in your library)

B) Easting (UTM Meters)

C) Northing (UTM Meters)

D) Null field

E) Note to attach to attribute in the block- ID number

F) Note to attach to attribute in the block- Easting

G) Note to attach to attribute in the block- Northing

 

If you need anything else, let me know and I'll try to get it posted.

AutoCAD Output.csv

Link to post
Share on other sites

If you want the simplest answer then use this http://www.lee-mac.com/ptmanager.html Not sure why you need the dcl code if your just after a simple read a csv and make blocks.

 

Even easier open in excel and use this line in column I =CONCATENATE("-insert ",A1," ",B1,",",C1," 1 1 0 ",E1,CHAR(13),F1,CHAR(13),G1,CHAR(13)) just copy down then copy and paste to notepad use replace to remove " save as a SCR file then type script and choose the file your blocks should appear.

Link to post
Share on other sites
  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...