Search the Community
Showing results for tags 'autocad notepad'.
-
Getting Info FROM autocad INTO Notepad. (getpoints and writelines)
kapat posted a topic in AutoLISP, Visual LISP & DCL
SOOooo..... i've been tooling around with getpoints and "cond" but i can't seem to make this work other then REALLY primitively. the 2 forums i have found on the matter are: HERE AND HERE i am not sure if it's bad karma to link to another set of forums, but for research sake, i think these should all be linked. The main problem i think most people have when they come here is they can find 90% of what their looking for in google, but have a hard time personalizing everything to the format they are looking for. I am afflicted with the same. i can just copy these guy's code and have it work halfway, but then ti's not really helping me out, since i have to go back and format it anyways. And i swear i google and try out 40 or 50 different way to code before i come to you guys. The guilt from the free coding i'm contracting from your guys really builds up. I hope i'm not seeming TOO much of a freeloader when i ask these questions, you guys really are the best. NOW, on to what i have, and what i am going for. Basically i want to pick a point, have the point named, and have that be put into notepad with formatting. such as this: (command "whatever") prompt for file name (location doens't matter to me, can be "c:\" or "user\desktop" (pick point) and the read out will have: PT1 111.1111 222.2222 333.3333 PT2 444.4444 555.5555 666.6666 and so on, and have the "pt#" increase with all the points. Also, the tricky part is i need "5 spaces" between the numbers without using a "\t". which is what i'd LIKE to use, but that's just not the way my cookie is crumbling today. i would like to thank anybody who has made it this far and hasn't moved on. Now code time: (defun c:P2FILE (/ fname file text pt p2) (setq fname (getkword "\nenter filename")) (setq file (open fname".txt" "w")) (setq pt1 (getpoint "\nPICK POINT")) (setq x (rtos (car pt1))) (setq y (rtos (cadr pt1))) (setq z (rtos (caddr Pt1))) (setq text (strcat "PT1 "x" "y" "z)) (write-line text fname) (close file) ) Now things i know are wrong but have no clue how to fix: "getkword" i'm sure is jut the wrong command, since putting in every variable is a ridiculous notion. and my "strcat" doens't number up with the points i pick, but i have no idea how to even START making that "cond" Thanks in advance for any help!- 35 replies
-
- reading variables
- autocad notepad
-
(and 1 more)
Tagged with: