Tharwat Posted June 19, 2010 Share Posted June 19, 2010 Hello, (defun c:on (/ f txtline) (if (setq f(open "c:\\my documents\\Drawing.dwg" "r")) (progn (while (setq txtLine(read-line f)) (princ txtLine)) (close f)) (princ "\n Error - File was not opened.") )) This Program dose not open the file which titled Drawing.dwg . And what dose it mean read char or line somtimes "w"? "r" - Reads a file with either read-char or read-line. Regards, Tharwat Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 19, 2010 Share Posted June 19, 2010 Look at the help file for 'open' the other modes are clearly explained. w ~ open for writing a ~ open for appending Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 19, 2010 Author Share Posted June 19, 2010 Look at the help file for 'open' the other modes are clearly explained. w ~ open for writing a ~ open for appending Lee. I am getting most of my information from Autocad Help, But nowadays Internet and Forums ,and I could not understand what will function open a drawing to write in? Plus to append and reading chars for .....???? Thats why I am asking experts ... Regards. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 19, 2010 Share Posted June 19, 2010 The 'open' 'read/write line' functions will open a file as a text file. If you wish to manipulate entities in another drawing, use ObjectDBX. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 19, 2010 Author Share Posted June 19, 2010 The 'open' 'read/write line' functions will open a file as a text file. If you wish to manipulate entities in another drawing, use ObjectDBX. So what is the porpose of writing in a drawing or manipulating with its entities ....? Do you want to say that manipulating will get entitiy's settings from its dictionay to reuse it in the running Autplisp program....? And writing will change entity's settings for a specific matter as well... ? Regards Tharwat Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 19, 2010 Share Posted June 19, 2010 I don't know what you are talking about. The 'open' function will open a file as a text file to be read line by line. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 20, 2010 Author Share Posted June 20, 2010 Hi The main issue still pending and not clear to me, I mean what is that thing or these things that will be read by 'open' ... and what's for ...? Any clarifications. Tharwat Quote Link to comment Share on other sites More sharing options...
muthu123 Posted June 20, 2010 Share Posted June 20, 2010 The 'open' 'read/write line' functions will open a file as a text file. If you wish to manipulate entities in another drawing, use ObjectDBX. Dear Lee, What is objectDBX and how it will be useful? and where i can get help? yours, Muthu. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 20, 2010 Share Posted June 20, 2010 Hi The main issue still pending and not clear to me, I mean what is that thing or these things that will be read by 'open' ... and what's for ...? You can use open to read a files such as txt/csv/xls all being opened in text file format. Quote Link to comment Share on other sites More sharing options...
asos2000 Posted June 20, 2010 Share Posted June 20, 2010 Suppose you have an excel file has coordinate data (X, Y & X) and you want to use this data to draw a line using these data So you use Open and then read these data Write: You want to save data in an excel file Am I in right direction Mr. Tharwat Hasan Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 20, 2010 Author Share Posted June 20, 2010 Suppose you have an excel file has coordinate data (X, Y & X) and you want to use this data to draw a line using these data So you use Open and then read these data Write: You want to save data in an excel file Am I in right direction Mr. Tharwat Hasan Yes, Now you are at the right rail forward. Thanks for sharing Quote Link to comment Share on other sites More sharing options...
asos2000 Posted June 20, 2010 Share Posted June 20, 2010 Yes, Now you are at the right rail forward. Thanks for sharing :? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.