converting txt file to lsp

converting txt file to lsp

itsnathanblake
Advocate Advocate
13,126 Views
7 Replies
Message 1 of 8

converting txt file to lsp

itsnathanblake
Advocate
Advocate

Hi guys,

 

I am currently having issue with converting a txt file to lsp, even though I have put .lsp at the end of the file name 

 

please tell me how I can override this.

 

itsnathanblake_0-1628190338800.png

 

0 Likes
Accepted solutions (1)
13,127 Views
7 Replies
Replies (7)
Message 2 of 8

Patchy
Mentor
Mentor

and what happen to it?

Is it write protected? crash your system?...........

0 Likes
Message 3 of 8

Kent1Cooper
Consultant
Consultant

@Patchy wrote:

and what happen to it? ....


Is the issue only that Windows Explorer is displaying its file Type as "Text Document" rather than "AutoLISP Application source"?  Does it work anyway?  If not, what is the "issue"?  Can you APPLOAD it?  Are there any messages?  If it loads, what happens when you try to run it?  I will start from the assumption that its contents are valid AutoLisp code, but does that need to be verified?  Etc., etc.

Kent Cooper, AIA
0 Likes
Message 4 of 8

JTBWorld
Advisor
Advisor

Check the "File name extensions" checkbox in File Explorer on the View tab. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

Message 5 of 8

pendean
Community Legend
Community Legend
Drag and drop it over an open DWG file in AutoCAD: did AutoCAD recognize and load the lisp?
Or did it give you an error message or offer to do something else with it?

Do it now, answer your own question on whether you actually changed the file extension or not, that's all that matters.
0 Likes
Message 6 of 8

vinodkl
Mentor
Mentor
Accepted solution

Hi @itsnathanblake 

It looks like you have named the file as brt.lsp but still the extension of the file is .txt. The .txt is not visible since the option of "file name extension" is disabled. Try turning it on (see snapshot below) in file explorer and then remove the file extension .txt from file and press enter that would fix the issue 😉🙂

vinodkl_0-1628225809792.png

 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 7 of 8

itsnathanblake
Advocate
Advocate

Hi guys thanks for all the assistance on this one, the last guy to comment got it tho it was because I didn't have file extensions in view. all sorted now so thanks for your inputs.

Message 8 of 8

18120536
Community Visitor
Community Visitor

(defun c:ciftNumara ()
(setq cnt 1)
(setq ss (ssget '((0 . "TEXT,MTEXT")))) ; Sadece text ve mtext seç
(if ss
(progn
(setq len (sslength ss))
(setq i 0)
(while (< i len)
(setq ent (ssname ss i))
(setq val (itoa cnt))
(command "_.change" ent "" "_p" "_value" val "")
(setq i (1+ i))
(setq ent (ssname ss i))
(command "_.change" ent "" "_p" "_value" val "")
(setq i (1+ i))
(setq cnt (1+ cnt))
)
)
(prompt "\nText nesneleri seçilmedi.")
)
(princ)
)

0 Likes