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.
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.
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.
The attached file, modified from yours, made Points and Text here.
Must change the extension from .txt to .lsp, for some new reason.