Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extract data from DXF file

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
2024 Views, 4 Replies

Extract data from DXF file

I am trying to write a lisp file that extracts the LAYER, Z, X, Y, TEXT HEIGHT, POINT NUMBER, from the attached DXF file. Ultimately I will have the lisp insert a "POINT" at the X,Y,Z, cords, and then a "TEXT" entity at the same coordinates with the text height value and the point number string. Both entities need to be on the layer ending in  "-PN". The layer name will change depending on the date. I have a third party program that creates the DXF file.

 

The point of the lisp file is to insert the point numbers and points into my drawing at their correct locations. For the life of me I can not make this work. I have attached the little bit of lisp I have, which unfortunately does not work properly because of it searching for the "TEXT" entry in the DXF file of which there are three per point number. I only need one. I have also attached the DXF file I have. Can anyone help me with the process? maybe just an overall procedure that I can then code myself? I'm just not good at getting lisp to read a file and extract what I want from it.

Tags (1)
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

ok. Made somthing work. it does need a little polish but I do have one bug I can't figure out. After the program runs the first time I get the following message

 

"Unknown command "SEDXFIN".  Press F1 for help."

 

why?

 

I ahve attached my working LISP.

Message 3 of 5
stevor
in reply to: Anonymous

To start with, there may be an exta "" in the layer command line.

S
Message 4 of 5
Anonymous
in reply to: stevor

Oh I think you're right! It just daened on me that it only happens when it has to creat the new layer. Thank you so much.

Message 5 of 5
stevor
in reply to: Anonymous

The attached file, modified from yours, made Points and Text here.

Must change the extension from .txt to .lsp, for some new  reason.

S

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost